Skip to content

Commit 24a0540

Browse files
committed
dding to handful of sanitizers
1 parent 7e10f34 commit 24a0540

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

compiler-rt/lib/msan/msan_interceptors.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ DECLARE_REAL(SIZE_T, strlen, const char *s)
6262
DECLARE_REAL(SIZE_T, strnlen, const char *s, SIZE_T maxlen)
6363
DECLARE_REAL(void *, memcpy, void *dest, const void *src, SIZE_T n)
6464
DECLARE_REAL(void *, memset, void *dest, int c, SIZE_T n)
65+
#if SANITIZER_MEMSET_EXPLICIT
66+
DECLARE_REAL(void *, memset_explicit, void *dest, int c, SIZE_T n)
67+
#endif
6568

6669
// True if this is a nested interceptor.
6770
static THREADLOCAL int in_interceptor_scope;

compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ using namespace __tsan;
4242

4343
DECLARE_REAL(void *, memcpy, void *to, const void *from, SIZE_T size)
4444
DECLARE_REAL(void *, memset, void *block, int c, SIZE_T size)
45+
#if SANITIZER_MEMSET_EXPLICIT
46+
DECLARE_REAL(void *, memset_explicit, void *block, int c, SIZE_T size)
47+
#endif
4548

4649
#if SANITIZER_FREEBSD || SANITIZER_APPLE
4750
#define stdout __stdoutp

compiler-rt/test/sanitizer_common/TestCases/Linux/memset_explicit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang -std=c23 -O0 %s -o %t && %run %t
2-
// UNSUPPORTED: asan, hwasan, ubsan
2+
// UNSUPPORTED: asan, lsan, hwasan, ubsan
33

44
#include <stddef.h>
55
#include <stdlib.h>

0 commit comments

Comments
 (0)