[PATCH] D37871: [ASAN] Add macro denoting availability of new `__asan_handle_no_return()` function.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 15:05:39 PDT 2017


EricWF created this revision.

Libc++abi attempts to use the newly added `__asan_handle_no_return()` when built under ASAN. Unfortunately older versions of compiler-rt do not provide this symbol, and so libc++abi needs a way to detect if `asan_interface.h` actually provides the function.

This patch adds the macro `SANITIZER_ASAN_HAS_HANDLE_NO_RETURN` which can be used to detect the availability of the new function.


https://reviews.llvm.org/D37871

Files:
  include/sanitizer/asan_interface.h


Index: include/sanitizer/asan_interface.h
===================================================================
--- include/sanitizer/asan_interface.h
+++ include/sanitizer/asan_interface.h
@@ -148,6 +148,10 @@
   // before things like _exit and execl to avoid false positives on stack.
   void __asan_handle_no_return(void);
 
+  // Required to allow ASAN versions of libc++abi to build against older
+  // versions of compiler-rt that do not provide this interface.
+# define SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN
+
 #ifdef __cplusplus
 }  // extern "C"
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37871.115299.patch
Type: text/x-patch
Size: 570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170914/658b7e5e/attachment.bin>


More information about the cfe-commits mailing list