Skip to content

Commit fabac8f

Browse files
committed
[asan] Define mallopt and mallinfo for Fuchsia asan runtime
1 parent 10a9dca commit fabac8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
129129

130130
#if SANITIZER_FUCHSIA
131131
#define SI_NOT_FUCHSIA 0
132+
#define SI_FUCHSIA 1
132133
#else
133134
#define SI_NOT_FUCHSIA 1
135+
#define SI_FUCHSIA 0
134136
#endif
135137

136138
#if SANITIZER_SOLARIS
@@ -521,7 +523,8 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
521523

522524
#define SANITIZER_INTERCEPT_MMAP SI_POSIX
523525
#define SANITIZER_INTERCEPT_MMAP64 SI_GLIBC || SI_SOLARIS
524-
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO (SI_GLIBC || SI_ANDROID)
526+
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO \
527+
(SI_GLIBC || SI_ANDROID || SI_FUCHSIA)
525528
#define SANITIZER_INTERCEPT_MEMALIGN (!SI_FREEBSD && !SI_MAC && !SI_NETBSD)
526529
#define SANITIZER_INTERCEPT___LIBC_MEMALIGN SI_GLIBC
527530
#define SANITIZER_INTERCEPT_PVALLOC (SI_GLIBC || SI_ANDROID)

0 commit comments

Comments
 (0)