Default ASan options from AFL++ in libafl_targets
This commit is contained in:
parent
96bbe37cc1
commit
54ac57b6f7
@ -46,8 +46,6 @@ pub const CMPLOG_MAP_H: usize = {};
|
|||||||
println!("cargo:rerun-if-env-changed=LIBAFL_CMPLOG_MAP_W");
|
println!("cargo:rerun-if-env-changed=LIBAFL_CMPLOG_MAP_W");
|
||||||
println!("cargo:rerun-if-env-changed=LIBAFL_CMPLOG_MAP_H");
|
println!("cargo:rerun-if-env-changed=LIBAFL_CMPLOG_MAP_H");
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=src/common.h");
|
|
||||||
|
|
||||||
//std::env::set_var("CC", "clang");
|
//std::env::set_var("CC", "clang");
|
||||||
//std::env::set_var("CXX", "clang++");
|
//std::env::set_var("CXX", "clang++");
|
||||||
|
|
||||||
@ -78,13 +76,20 @@ pub const CMPLOG_MAP_H: usize = {};
|
|||||||
|
|
||||||
#[cfg(feature = "libfuzzer")]
|
#[cfg(feature = "libfuzzer")]
|
||||||
{
|
{
|
||||||
println!("cargo:rerun-if-changed=src/libfuzzer_compatibility.c");
|
println!("cargo:rerun-if-changed=src/libfuzzer.c");
|
||||||
|
|
||||||
cc::Build::new()
|
cc::Build::new()
|
||||||
.file(src_dir.join("libfuzzer_compatibility.c"))
|
.file(src_dir.join("libfuzzer.c"))
|
||||||
.compile("libfuzzer_compatibility");
|
.compile("libfuzzer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!("cargo:rerun-if-changed=src/common.h");
|
||||||
|
println!("cargo:rerun-if-changed=src/common.c");
|
||||||
|
|
||||||
|
cc::Build::new()
|
||||||
|
.file(src_dir.join("common.c"))
|
||||||
|
.compile("common");
|
||||||
|
|
||||||
println!("cargo:rerun-if-changed=src/cmplog.h");
|
println!("cargo:rerun-if-changed=src/cmplog.h");
|
||||||
println!("cargo:rerun-if-changed=src/cmplog.c");
|
println!("cargo:rerun-if-changed=src/cmplog.c");
|
||||||
|
|
||||||
|
10
libafl_targets/src/common.c
Normal file
10
libafl_targets/src/common.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
EXT_FUNC_IMPL(__asan_default_options, const char*, (), false) {
|
||||||
|
return "abort_on_error=1:detect_leaks=0:"
|
||||||
|
"malloc_context_size=0:symbolize=0:"
|
||||||
|
"allocator_may_return_null=1:"
|
||||||
|
"detect_odr_violation=0:handle_segv=0:"
|
||||||
|
"handle_sigbus=0:handle_abort=0:"
|
||||||
|
"handle_sigfpe=0:handle_sigill=0";
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user