[PATCH] D82691: Disable interception of sigaltstack on i386 macOS.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 10:16:14 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG888951aaca58: Disable interception of sigaltstack on i386 macOS. (authored by delcypher).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82691/new/
https://reviews.llvm.org/D82691
Files:
compiler-rt/lib/sanitizer_common/sanitizer_platform.h
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -597,7 +597,10 @@
#define SANITIZER_INTERCEPT_QSORT \
(SI_POSIX && !SI_IOSSIM && !SI_WATCHOS && !SI_TVOS && !SI_ANDROID)
#define SANITIZER_INTERCEPT_QSORT_R (SI_LINUX && !SI_ANDROID)
-#define SANITIZER_INTERCEPT_SIGALTSTACK SI_POSIX
+// sigaltstack on i386 macOS cannot be intercepted due to setjmp()
+// calling it and assuming that it does not clobber registers.
+#define SANITIZER_INTERCEPT_SIGALTSTACK \
+ (SI_POSIX && !(SANITIZER_MAC && SANITIZER_I386))
#define SANITIZER_INTERCEPT_UNAME (SI_POSIX && !SI_FREEBSD)
#define SANITIZER_INTERCEPT___XUNAME SI_FREEBSD
Index: compiler-rt/lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -132,6 +132,12 @@
# define SANITIZER_X32 0
#endif
+#if defined(__i386__) || defined(_M_IX86)
+# define SANITIZER_I386 1
+#else
+# define SANITIZER_I386 0
+#endif
+
#if defined(__mips__)
# define SANITIZER_MIPS 1
# if defined(__mips64)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82691.276121.patch
Type: text/x-patch
Size: 1354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200707/9935529f/attachment.bin>
More information about the llvm-commits
mailing list