Skip to content

Commit dbeac9f

Browse files
committed
[PR] fmayer - change wording of weak symbol
1 parent b2cd641 commit dbeac9f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,10 @@ INTERCEPTOR(void *, valloc, SIZE_T size) {
466466
#if SANITIZER_INTERCEPT_ALIGNED_ALLOC
467467

468468
// In some cases, when targeting older Darwin versions, this warning may pop up.
469-
// We know that the real aligned_alloc will never be called on older systems
470-
// because it will be weakly linked by us and the client OSX won't provide it.
469+
// Because we are providing a wrapper, the client is responsible to check
470+
// whether aligned_alloc is available, not us. We still succeed linking on an
471+
// old OS, because we are using a weak symbol (see aligned_alloc in
472+
// sanitizer_platform_interceptors.h)
471473
#pragma clang diagnostic push
472474
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
473475
INTERCEPTOR(void *, aligned_alloc, SIZE_T alignment, SIZE_T size) {

0 commit comments

Comments
 (0)