[PATCH] D37872: [libc++abi] Fix ASAN build with older compiler-rt versions.
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 14 15:10:34 PDT 2017
EricWF created this revision.
Herald added a subscriber: dberris.
compiler-rt recently added the `__asan_handle_no_return()` function that libc++abi needs to use, however older versions of compiler-rt don't provide this interface and that breaks the libc++abi build.
This patch attempts to fix the issues by using a macro to detect if `asan_interface.h` is new enough to provide the function.
See https://reviews.llvm.org/D37871
https://reviews.llvm.org/D37872
Files:
src/cxa_exception.cpp
Index: src/cxa_exception.cpp
===================================================================
--- src/cxa_exception.cpp
+++ src/cxa_exception.cpp
@@ -222,7 +222,8 @@
exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
-#if __has_feature(address_sanitizer)
+#if __has_feature(address_sanitizer) && \
+ defined(SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN)
// Inform the ASan runtime that now might be a good time to clean stuff up.
__asan_handle_no_return();
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37872.115300.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170914/0013ce8d/attachment.bin>
More information about the cfe-commits
mailing list