@@ -491,7 +491,7 @@ pub fn build(b: *std.Build) !void {
491491 });
492492 socketfuzz_lib .addCSourceFile (.{
493493 .file = AFLplusplus_utl_path .path (b , "socket_fuzzing/socketfuzz.c" ),
494- .flags = &.{ if (ptr_bit_width == 32 ) "-m32" else "-m64" , "-Wall" , "-Wextra" },
494+ .flags = &.{ if (ptr_bit_width == 32 ) "-m32" else "-m64" , "-Wall" , "-Wextra" , "-fno-sanitize=undefined" },
495495 });
496496 socketfuzz_lib .addIncludePath (AFLplusplus_inc_path );
497497 socketfuzz_lib .linkLibC ();
@@ -511,7 +511,7 @@ pub fn build(b: *std.Build) !void {
511511 });
512512 argvfuzz_lib .addCSourceFile (.{
513513 .file = AFLplusplus_utl_path .path (b , "argv_fuzzing/argvfuzz.c" ),
514- .flags = &.{ if (ptr_bit_width == 32 ) "-m32" else "-m64" , "-Wall" , "-Wextra" },
514+ .flags = &.{ if (ptr_bit_width == 32 ) "-m32" else "-m64" , "-Wall" , "-Wextra" , "-fno-sanitize=undefined" },
515515 });
516516 argvfuzz_lib .addIncludePath (AFLplusplus_inc_path );
517517 argvfuzz_lib .linkLibC ();
@@ -575,6 +575,7 @@ const EXE_FLAGS = .{
575575 "-Wno-pointer-sign" ,
576576 "-Wno-pointer-arith" ,
577577 "-Wno-variadic-macros" ,
578+ "-fno-sanitize=undefined" ,
578579 "-DDOC_PATH=\"\" " ,
579580 "-D_AFL_SPECIAL_PERFORMANCE" ,
580581};
@@ -590,6 +591,7 @@ const LLVM_EXE_C_FLAGS = .{
590591 "-Wno-unused-result" ,
591592 "-Wno-unused-function" ,
592593 "-Wno-variadic-macros" ,
594+ "-fno-sanitize=undefined" ,
593595 "-Wno-deprecated-copy-with-dtor" ,
594596 "-DUSE_BINDIR=1" ,
595597 "-DAFL_REAL_LD=\" lld\" " ,
@@ -632,5 +634,6 @@ const UTIL_LIB_FLAGS = .{
632634 "-funroll-loops" ,
633635 "-Wall" ,
634636 "-Wno-pointer-sign" ,
637+ "-fno-sanitize=undefined" ,
635638 "-D_FORTIFY_SOURCE=2" ,
636639};
0 commit comments