From 9aff5e6e4809c771e51e0fdff9319ed56ecd7fde Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Sat, 9 Dec 2017 02:28:12 +0100 Subject: [PATCH] libhfuzz: implement __sanitizer_cov_trace_const* variants --- libhfuzz/instrument.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libhfuzz/instrument.c b/libhfuzz/instrument.c index 8dc1a15a5..29f2c787f 100644 --- a/libhfuzz/instrument.c +++ b/libhfuzz/instrument.c @@ -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