- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for marshalCorpusFile (0.33 sec)
-
src/internal/fuzz/encoding_test.go
for sz := 1; sz <= len(buf); sz <<= 1 { sz := sz data := marshalCorpusFile(buf[:sz]) b.Run(strconv.Itoa(sz), func(b *testing.B) { for i := 0; i < b.N; i++ { b.SetBytes(int64(sz)) unmarshalCorpusFile(data) } }) } } func TestByteRoundTrip(t *testing.T) { for x := 0; x < 256; x++ { b1 := byte(x) buf := marshalCorpusFile(b1) vs, err := unmarshalCorpusFile(buf) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 00:20:34 UTC 2024 - 8.2K bytes - Viewed (0) -
src/internal/fuzz/worker_test.go
} defer func() { if err := mem.Close(); err != nil { b.Error(err) } }() initialVal := []any{make([]byte, 32)} encodedVals := marshalCorpusFile(initialVal...) mem.setValue(encodedVals) ws.memMu <- mem b.ResetTimer() for i := 0; i < b.N; i++ { ws.m = newMutator() mem.setValue(encodedVals) mem.header().count = 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 4.8K bytes - Viewed (0) -
src/internal/fuzz/encoding.go
"strings" "unicode/utf8" ) // encVersion1 will be the first line of a file with version 1 encoding. var encVersion1 = "go test fuzz v1" // marshalCorpusFile encodes an arbitrary number of arguments into the file format for the // corpus. func marshalCorpusFile(vals ...any) []byte { if len(vals) == 0 { panic("must have at least one value to marshal") } b := bytes.NewBuffer([]byte(encVersion1 + "\n"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 16:39:12 UTC 2022 - 11K bytes - Viewed (0) -
src/internal/fuzz/worker.go
case []byte: minimizeBytes(v, tryMinimized, shouldStop) default: panic("impossible") } return true, retErr } func writeToMem(vals []any, mem *sharedMem) { b := marshalCorpusFile(vals...) mem.setValue(b) } // ping does nothing. The coordinator calls this method to ensure the worker // has called F.Fuzz and can communicate.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 37.7K bytes - Viewed (0) -
src/internal/fuzz/fuzz.go
// Make sure all the seed corpus has marshaled data. for i := range opts.Seed { if opts.Seed[i].Data == nil && opts.Seed[i].Values != nil { opts.Seed[i].Data = marshalCorpusFile(opts.Seed[i].Values...) } } c := &coordinator{ opts: opts, startTime: time.Now(), inputC: make(chan fuzzInput), minimizeC: make(chan fuzzMinimizeInput),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 34.1K bytes - Viewed (0)