我想从stbi 线束中对现有线束进行模糊测试并进行一些小改动。从free(img)
到if(img) free(img)
;
用这个命令编译clang -fsanitize=fuzzer,address -ggdb -O0 stbi_read_fuzzer.c -o fuzzer
,然后运行./fuzzer corpus -fork=1 -ignore_crashes=1 -dict=jpeg.dict -seed=123
几个小时后,它会产生一些崩溃(全局缓冲区溢出,空闲后堆使用,缓冲区溢出)。但是当我运行所有崩溃文件时它并没有崩溃
aldo@vps:~/stb/tests$ ./fuzzer crash-edab9036233c269e258fe93c2a46d46d5d6e7112
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 2279336272
INFO: Loaded 1 modules (2132 inline 8-bit counters): 2132 [0x61b510, 0x61bd64),
INFO: Loaded 1 PC tables (2132 PCs): 2132 [0x5d0258,0x5d8798),
./fuzzer: Running 1 inputs 1 time(s) each.
Running: crash-edab9036233c269e258fe93c2a46d46d5d6e7112
Executed crash-edab9036233c269e258fe93c2a46d46d5d6e7112 in 3 ms
***
*** NOTE: fuzzing was not performed, you have only
*** executed the target code on a fixed set of inputs.
***
为什么没有崩溃?我正在使用来自 apt.llvm.org 的 ubuntu 20.04 和 llvm12