mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 09:41:35 +00:00
no functional change, avoid conditional jump
This commit is contained in:
parent
1398d8d5a6
commit
7d9eed0ed5
@ -58,11 +58,14 @@ __thread u32 __afl_prev_loc;
|
|||||||
void __afl_trace(u32 x) {
|
void __afl_trace(u32 x) {
|
||||||
|
|
||||||
u32 l = __afl_prev_loc;
|
u32 l = __afl_prev_loc;
|
||||||
__afl_area_ptr[l ^ x]++;
|
|
||||||
/* // neverZero is disable as gcc creates non-performant code. shame on you gcc
|
#if 0 /* enable for neverZero feature. By default disabled since too inefficient :-( */
|
||||||
if (__afl_area_ptr[l ^ x] == 0)
|
/* @Marc: avoid conditional jumps here */
|
||||||
__afl_area_ptr[l ^ x]++;
|
__afl_area_ptr[l ^ x] += 1 + (__afl_area_ptr[l ^ x] == (u8)~0);
|
||||||
*/
|
#else
|
||||||
|
++__afl_area_ptr[l ^ x];
|
||||||
|
#endif
|
||||||
|
|
||||||
__afl_prev_loc = (x >> 1);
|
__afl_prev_loc = (x >> 1);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user