[compiler-rt] make mmap-munmap interceptor fail earlier (PR #169775)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 13:52:16 PST 2025
================
@@ -47,6 +47,12 @@
# define ASAN_PTHREAD_CREATE_VERSION "GLIBC_2.2"
# endif
+#if !defined(MAP_FAILED)
+# define MAP_FAILED ((void *)-1)
----------------
thurstond wrote:
`map_fixed` (in lowercase) is defined in compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp for this purpose (example usage: compiler-rt/lib/hwasan/hwasan_interceptors.cpp).
https://github.com/llvm/llvm-project/pull/169775
More information about the llvm-commits
mailing list