mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 01:58:17 +00:00
fix stderr output
This commit is contained in:
@ -327,10 +327,13 @@ static void __afl_map_shm(void) {
|
|||||||
|
|
||||||
id_str = getenv(CMPLOG_SHM_ENV_VAR);
|
id_str = getenv(CMPLOG_SHM_ENV_VAR);
|
||||||
|
|
||||||
if (getenv("AFL_DEBUG"))
|
if (getenv("AFL_DEBUG")) {
|
||||||
|
|
||||||
fprintf(stderr, "DEBUG: cmplog id_str %s\n",
|
fprintf(stderr, "DEBUG: cmplog id_str %s\n",
|
||||||
id_str == NULL ? "<null>" : id_str);
|
id_str == NULL ? "<null>" : id_str);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (id_str) {
|
if (id_str) {
|
||||||
|
|
||||||
#ifdef USEMMAP
|
#ifdef USEMMAP
|
||||||
@ -402,9 +405,12 @@ static void __afl_start_snapshots(void) {
|
|||||||
|
|
||||||
if (read(FORKSRV_FD, &was_killed, 4) != 4) _exit(1);
|
if (read(FORKSRV_FD, &was_killed, 4) != 4) _exit(1);
|
||||||
|
|
||||||
if (getenv("AFL_DEBUG"))
|
if (getenv("AFL_DEBUG")) {
|
||||||
|
|
||||||
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ((was_killed & (FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) ==
|
if ((was_killed & (FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) ==
|
||||||
(FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) {
|
(FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) {
|
||||||
|
|
||||||
@ -611,9 +617,12 @@ static void __afl_start_forkserver(void) {
|
|||||||
|
|
||||||
if (read(FORKSRV_FD, &was_killed, 4) != 4) _exit(1);
|
if (read(FORKSRV_FD, &was_killed, 4) != 4) _exit(1);
|
||||||
|
|
||||||
if (getenv("AFL_DEBUG"))
|
if (getenv("AFL_DEBUG")) {
|
||||||
|
|
||||||
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ((was_killed & (FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) ==
|
if ((was_killed & (FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) ==
|
||||||
(FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) {
|
(FS_OPT_ENABLED | FS_OPT_SHDMEM_FUZZ)) {
|
||||||
|
|
||||||
@ -908,8 +917,12 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
|||||||
u32 inst_ratio = 100;
|
u32 inst_ratio = 100;
|
||||||
char *x;
|
char *x;
|
||||||
|
|
||||||
fprintf(stderr, "Running __sanitizer_cov_trace_pc_guard_init: %p-%p\n", start,
|
if (getenv("AFL_DEBUG")) {
|
||||||
stop);
|
|
||||||
|
fprintf(stderr, "Running __sanitizer_cov_trace_pc_guard_init: %p-%p\n",
|
||||||
|
start, stop);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (start == stop || *start) return;
|
if (start == stop || *start) return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user