mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
add env info to afl-showmap, in qemu_mode add forgotten MacOSX env var to afl-analyze, afl-fuzz, afl-tmin
This commit is contained in:
parent
212e5d1a72
commit
caa8fea8e2
@ -728,9 +728,9 @@ static void set_up_environment(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qemu_preload)
|
if (qemu_preload)
|
||||||
buf = alloc_printf("%s,LD_PRELOAD=%s", qemu_preload, afl_preload);
|
buf = alloc_printf("%s,LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", qemu_preload, afl_preload, afl_preload);
|
||||||
else
|
else
|
||||||
buf = alloc_printf("LD_PRELOAD=%s", afl_preload);
|
buf = alloc_printf("LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", afl_preload, afl_preload);
|
||||||
|
|
||||||
setenv("QEMU_SET_ENV", buf, 1);
|
setenv("QEMU_SET_ENV", buf, 1);
|
||||||
|
|
||||||
@ -806,7 +806,7 @@ static void usage(u8* argv0) {
|
|||||||
" (must contain abort_on_error=1 and symbolize=0)\n"
|
" (must contain abort_on_error=1 and symbolize=0)\n"
|
||||||
"MSAN_OPTIONS: custom settings for MSAN\n"
|
"MSAN_OPTIONS: custom settings for MSAN\n"
|
||||||
" (must contain exitcode="STRINGIFY(MSAN_ERROR)" and symbolize=0)\n"
|
" (must contain exitcode="STRINGIFY(MSAN_ERROR)" and symbolize=0)\n"
|
||||||
"AFL_PRELOAD: LD_PRELOAD settings for target\n"
|
"AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n"
|
||||||
"AFL_ANALYZE_HEX: print file offsets in hexadecimal instead of decimal\n"
|
"AFL_ANALYZE_HEX: print file offsets in hexadecimal instead of decimal\n"
|
||||||
"AFL_SKIP_BIN_CHECK: skip checking the location of and the target\n"
|
"AFL_SKIP_BIN_CHECK: skip checking the location of and the target\n"
|
||||||
|
|
||||||
|
@ -717,7 +717,7 @@ int main(int argc, char** argv, char** envp) {
|
|||||||
|
|
||||||
if (getenv("LD_PRELOAD"))
|
if (getenv("LD_PRELOAD"))
|
||||||
WARNF(
|
WARNF(
|
||||||
"LD_PRELOAD is set, are you sure that is want to you want to do "
|
"LD_PRELOAD is set, are you sure that is what to you want to do "
|
||||||
"instead of using AFL_PRELOAD?");
|
"instead of using AFL_PRELOAD?");
|
||||||
|
|
||||||
if (getenv("AFL_PRELOAD")) {
|
if (getenv("AFL_PRELOAD")) {
|
||||||
@ -739,9 +739,9 @@ int main(int argc, char** argv, char** envp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qemu_preload)
|
if (qemu_preload)
|
||||||
buf = alloc_printf("%s,LD_PRELOAD=%s", qemu_preload, afl_preload);
|
buf = alloc_printf("%s,LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", qemu_preload, afl_preload, afl_preload);
|
||||||
else
|
else
|
||||||
buf = alloc_printf("LD_PRELOAD=%s", afl_preload);
|
buf = alloc_printf("LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", afl_preload, afl_preload);
|
||||||
|
|
||||||
setenv("QEMU_SET_ENV", buf, 1);
|
setenv("QEMU_SET_ENV", buf, 1);
|
||||||
|
|
||||||
|
@ -560,9 +560,9 @@ static void set_up_environment(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qemu_preload)
|
if (qemu_preload)
|
||||||
buf = alloc_printf("%s,LD_PRELOAD=%s", qemu_preload, afl_preload);
|
buf = alloc_printf("%s,LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", qemu_preload, afl_preload, afl_preload);
|
||||||
else
|
else
|
||||||
buf = alloc_printf("LD_PRELOAD=%s", afl_preload);
|
buf = alloc_printf("LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", afl_preload, afl_preload);
|
||||||
|
|
||||||
setenv("QEMU_SET_ENV", buf, 1);
|
setenv("QEMU_SET_ENV", buf, 1);
|
||||||
|
|
||||||
@ -647,8 +647,15 @@ static void usage(u8* argv0) {
|
|||||||
" -c - allow core dumps\n\n"
|
" -c - allow core dumps\n\n"
|
||||||
|
|
||||||
"This tool displays raw tuple data captured by AFL instrumentation.\n"
|
"This tool displays raw tuple data captured by AFL instrumentation.\n"
|
||||||
"For additional help, consult %s/README.md.\n",
|
"For additional help, consult %s/README.md.\n\n"
|
||||||
argv0, MEM_LIMIT, doc_path);
|
|
||||||
|
"Environment variables used:\n"
|
||||||
|
"AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n"
|
||||||
|
"AFL_DEBUG: enable extra developer output\n"
|
||||||
|
"AFL_CMIN_CRASHES_ONLY: (cmin_mode) only write tuples for crashing inputs\n"
|
||||||
|
"AFL_CMIN_ALLOW_ANY: (cmin_mode) write tuples for crashing inputs also\n"
|
||||||
|
"LD_BIND_LAZY: do not set LD_BIND_NOW env var for target\n"
|
||||||
|
, argv0, MEM_LIMIT, doc_path);
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
|
@ -903,9 +903,9 @@ static void set_up_environment(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qemu_preload)
|
if (qemu_preload)
|
||||||
buf = alloc_printf("%s,LD_PRELOAD=%s", qemu_preload, afl_preload);
|
buf = alloc_printf("%s,LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", qemu_preload, afl_preload, afl_preload);
|
||||||
else
|
else
|
||||||
buf = alloc_printf("LD_PRELOAD=%s", afl_preload);
|
buf = alloc_printf("LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s", afl_preload, afl_preload);
|
||||||
|
|
||||||
setenv("QEMU_SET_ENV", buf, 1);
|
setenv("QEMU_SET_ENV", buf, 1);
|
||||||
|
|
||||||
@ -985,7 +985,7 @@ static void usage(u8* argv0) {
|
|||||||
" (must contain abort_on_error=1 and symbolize=0)\n"
|
" (must contain abort_on_error=1 and symbolize=0)\n"
|
||||||
"MSAN_OPTIONS: custom settings for MSAN\n"
|
"MSAN_OPTIONS: custom settings for MSAN\n"
|
||||||
" (must contain exitcode="STRINGIFY(MSAN_ERROR)" and symbolize=0)\n"
|
" (must contain exitcode="STRINGIFY(MSAN_ERROR)" and symbolize=0)\n"
|
||||||
"AFL_PRELOAD: LD_PRELOAD settings for target\n"
|
"AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n"
|
||||||
"AFL_TMIN_EXACT: require execution paths to match for crashing inputs\n"
|
"AFL_TMIN_EXACT: require execution paths to match for crashing inputs\n"
|
||||||
|
|
||||||
, argv0, EXEC_TIMEOUT, MEM_LIMIT, doc_path);
|
, argv0, EXEC_TIMEOUT, MEM_LIMIT, doc_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user