Skip to content

Commit

Permalink
libhfuzz: implement __sanitizer_cov_trace_const* variants
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Dec 9, 2017
1 parent 55621fd commit 9aff5e6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libhfuzz/instrument.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_cmp8(uint64_t Arg1, uint6
}
}

/*
* Const versions of trace_cmp, we don't use any special handling for these (for
* now)
*/
void __sanitizer_cov_trace_const_cmp1(uint8_t Arg1, uint8_t Arg2)
__attribute__((weak, alias("__sanitizer_cov_trace_cmp1")));
void __sanitizer_cov_trace_const_cmp2(uint16_t Arg1, uint16_t Arg2)
__attribute__((weak, alias("__sanitizer_cov_trace_cmp2")));
void __sanitizer_cov_trace_const_cmp4(uint32_t Arg1, uint32_t Arg2)
__attribute__((weak, alias("__sanitizer_cov_trace_cmp4")));
void __sanitizer_cov_trace_const_cmp8(uint64_t Arg1, uint64_t Arg2)
__attribute__((weak, alias("__sanitizer_cov_trace_cmp8")));

/*
* Cases[0] is number of comparison entries
* Cases[1] is length of Val in bits
Expand Down

0 comments on commit 9aff5e6

Please sign in to comment.