diff options
author | Robert Swiecki <robert@swiecki.net> | 2017-01-26 13:02:45 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2017-01-26 13:02:45 +0100 |
commit | 5e933fb377d632b3179eac60df9d6220ce43417b (patch) | |
tree | 53bedbaa1eb2d5b303f67e6f25a74b81187a4e3e /libhfuzz/instrument.c | |
parent | 846ccd715444159e8405586e9eb111ba2bd9d2e3 (diff) | |
download | honggfuzz-5e933fb377d632b3179eac60df9d6220ce43417b.tar.gz |
libhfuzz: slight implementation wrt guards
Diffstat (limited to 'libhfuzz/instrument.c')
-rw-r--r-- | libhfuzz/instrument.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libhfuzz/instrument.c b/libhfuzz/instrument.c index bdb26efc..b192cc2e 100644 --- a/libhfuzz/instrument.c +++ b/libhfuzz/instrument.c @@ -172,7 +172,8 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t * start, uint32_t * stop) fprintf(stderr, "This process has too many PC guards\n"); exit(1); } - *x = n; + /* If the corresponding PC was already hit, map this specific guard as non-interesting (0) */ + *x = ATOMIC_GET(feedback->pcGuardMap[n]) ? 0U : n; } } |