mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
make fuzzing of test-floatingpoint reproducible
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
long double magic;
|
float magic;
|
||||||
|
|
||||||
ssize_t bytes_read = read(STDIN_FILENO, &magic, sizeof(magic));
|
ssize_t bytes_read = read(STDIN_FILENO, &magic, sizeof(magic));
|
||||||
if (bytes_read < (ssize_t)sizeof(magic)) { return 1; }
|
if (bytes_read < (ssize_t)sizeof(magic)) { return 1; }
|
||||||
|
@ -388,10 +388,10 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
|
|||||||
AFL_LLVM_INSTRUMENT=AFL AFL_DEBUG=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 AFL_LLVM_LAF_SPLIT_FLOATS=1 ../afl-clang-fast -o test-floatingpoint test-floatingpoint.c > test.out 2>&1
|
AFL_LLVM_INSTRUMENT=AFL AFL_DEBUG=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 AFL_LLVM_LAF_SPLIT_FLOATS=1 ../afl-clang-fast -o test-floatingpoint test-floatingpoint.c > test.out 2>&1
|
||||||
test -e test-floatingpoint && {
|
test -e test-floatingpoint && {
|
||||||
mkdir -p in
|
mkdir -p in
|
||||||
echo 0 > in/in
|
echo ZZ > in/in
|
||||||
$ECHO "$GREY[*] running afl-fuzz with floating point splitting, this will take max. 30 seconds"
|
$ECHO "$GREY[*] running afl-fuzz with floating point splitting, this will take max. 30 seconds"
|
||||||
{
|
{
|
||||||
AFL_BENCH_UNTIL_CRASH=1 ../afl-fuzz -V30 -m ${MEM_LIMIT} -i in -o out -- ./test-floatingpoint >>errors 2>&1
|
AFL_BENCH_UNTIL_CRASH=1 ../afl-fuzz -s1 -V30 -m ${MEM_LIMIT} -i in -o out -- ./test-floatingpoint >>errors 2>&1
|
||||||
} >>errors 2>&1
|
} >>errors 2>&1
|
||||||
test -n "$( ls out/crashes/id:* 2>/dev/null )" && {
|
test -n "$( ls out/crashes/id:* 2>/dev/null )" && {
|
||||||
$ECHO "$GREEN[+] llvm_mode laf-intel floatingpoint splitting feature works correctly"
|
$ECHO "$GREEN[+] llvm_mode laf-intel floatingpoint splitting feature works correctly"
|
||||||
|
Reference in New Issue
Block a user