tests/fuzzers/abi: better test generation (#22158)

* tests/fuzzers/abi: better test generation

* tests/fuzzers/abi: fixed packing issue

* oss-fuzz: enable abi fuzzer
This commit is contained in:
Marius van der Wijden
2021-01-18 14:33:15 +01:00
committed by GitHub
parent 034ecc3210
commit 398182284c
3 changed files with 51 additions and 79 deletions

View File

@ -23,13 +23,8 @@ import (
// TestReplicate can be used to replicate crashers from the fuzzing tests.
// Just replace testString with the data in .quoted
func TestReplicate(t *testing.T) {
testString := "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00000000000" +
"00000000000000000000" +
"00000000000000000000" +
"00000001"
testString := "N\xef\xbf0\xef\xbf99000000000000" +
"000000000000"
data := []byte(testString)
runFuzzer(data)