mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 03:48:08 +00:00
add AFL_USE_TSAN
This commit is contained in:
@ -42,10 +42,10 @@
|
||||
#endif /* !__linux__ */
|
||||
|
||||
#ifndef likely
|
||||
# define likely(x) __builtin_expect((!!(x)),1)
|
||||
#define likely(x) __builtin_expect((!!(x)), 1)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
# define unlikely(x) __builtin_expect((!!(x)),0)
|
||||
#define unlikely(x) __builtin_expect((!!(x)), 0)
|
||||
#endif
|
||||
|
||||
/* Change this value to tune the compare coverage */
|
||||
@ -235,7 +235,12 @@ int strcmp(const char *str1, const char *str2) {
|
||||
|
||||
int strncmp(const char *str1, const char *str2, size_t len) {
|
||||
|
||||
if (unlikely(!__libc_strncmp)) { __libc_strncmp = dlsym(RTLD_NEXT, "strncmp"); }
|
||||
if (unlikely(!__libc_strncmp)) {
|
||||
|
||||
__libc_strncmp = dlsym(RTLD_NEXT, "strncmp");
|
||||
|
||||
}
|
||||
|
||||
void *retaddr = __builtin_return_address(0);
|
||||
|
||||
if (__compcov_is_in_bound(retaddr) &&
|
||||
@ -265,7 +270,12 @@ int strncmp(const char *str1, const char *str2, size_t len) {
|
||||
|
||||
int strcasecmp(const char *str1, const char *str2) {
|
||||
|
||||
if (unlikely(!__libc_strcasecmp)) { __libc_strncasecmp = dlsym(RTLD_NEXT, "strcasecmp"); }
|
||||
if (unlikely(!__libc_strcasecmp)) {
|
||||
|
||||
__libc_strncasecmp = dlsym(RTLD_NEXT, "strcasecmp");
|
||||
|
||||
}
|
||||
|
||||
void *retaddr = __builtin_return_address(0);
|
||||
|
||||
if (__compcov_is_in_bound(retaddr) &&
|
||||
@ -296,7 +306,12 @@ int strcasecmp(const char *str1, const char *str2) {
|
||||
|
||||
int strncasecmp(const char *str1, const char *str2, size_t len) {
|
||||
|
||||
if (unlikely(!__libc_strncasecmp)) { __libc_strncasecmp = dlsym(RTLD_NEXT, "strncasecmp"); }
|
||||
if (unlikely(!__libc_strncasecmp)) {
|
||||
|
||||
__libc_strncasecmp = dlsym(RTLD_NEXT, "strncasecmp");
|
||||
|
||||
}
|
||||
|
||||
void *retaddr = __builtin_return_address(0);
|
||||
|
||||
if (__compcov_is_in_bound(retaddr) &&
|
||||
|
Reference in New Issue
Block a user