Skip to content

Commit 69c777b

Browse files
authored
Revert "[compiler-rt][sanitizer-common] adding C23 memset_explicit interception." (#157317)
Reverts #154428 due to buildbot breakages (e.g., https://lab.llvm.org/buildbot/#/builders/51/builds/22984)
1 parent 7e55a4c commit 69c777b

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,6 @@ INTERCEPTOR(void *, bzero, void *block, usize size) {
233233
#define INIT_BZERO
234234
#endif // SANITIZER_INTERCEPT_BZERO
235235

236-
#if SANITIZER_INTERCEPT_MEMSET_EXPLICIT
237-
INTERCEPTOR(void *, memset_explicit, void *block, int c, usize size) {
238-
void *ctx;
239-
COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, c, size);
240-
}
241-
#define INIT_MEMSET_EXPLICIT COMMON_INTERCEPT_FUNCTION(memset_explicit)
242-
#else
243-
#define INIT_MEMSET_EXPLICIT
244-
#endif
245-
246236
namespace __sanitizer {
247237
// This does not need to be called if InitializeCommonInterceptors() is called.
248238
void InitializeMemintrinsicInterceptors() {
@@ -252,6 +242,5 @@ void InitializeMemintrinsicInterceptors() {
252242
INIT_AEABI_MEM;
253243
INIT___BZERO;
254244
INIT_BZERO;
255-
INIT_MEMSET_EXPLICIT;
256245
}
257246
} // namespace __sanitizer

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,17 +663,15 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
663663
#define SANITIZER_INTERCEPT_GETSERVBYNAME_R SI_GLIBC
664664
#define SANITIZER_INTERCEPT_GETSERVBYPORT_R SI_GLIBC
665665

666-
// Until free_sized, free_aligned_sized and memset_explicit are more generally available,
666+
// Until free_sized and free_aligned_sized are more generally available,
667667
// we can only unconditionally intercept on ELF-based platforms where it
668668
// is okay to have undefined weak symbols.
669669
#ifdef __ELF__
670670
# define SANITIZER_INTERCEPT_FREE_SIZED 1
671671
# define SANITIZER_INTERCEPT_FREE_ALIGNED_SIZED 1
672-
# define SANITIZER_INTERCEPT_MEMSET_EXPLICIT 1
673672
#else
674673
# define SANITIZER_INTERCEPT_FREE_SIZED 0
675674
# define SANITIZER_INTERCEPT_FREE_ALIGNED_SIZED 0
676-
# define SANITIZER_INTERCEPT_MEMSET_EXPLICIT 0
677675
#endif
678676

679677
// This macro gives a way for downstream users to override the above

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

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)