This is an archive of the discontinued LLVM Phabricator instance.

[ASAN] Add macro denoting availability of new `__asan_handle_no_return()` function.
ClosedPublic

Authored by EricWF on Sep 14 2017, 3:05 PM.

Details

Summary

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_INTERFACE_HAS_HANDLE_NO_RETURN which can be used to detect the availability of the new function.

Diff Detail

Event Timeline

EricWF created this revision.Sep 14 2017, 3:05 PM

This looks fine to me (along with D37872)

EricWF edited the summary of this revision. (Show Details)Sep 14 2017, 3:15 PM
phosek accepted this revision.Sep 14 2017, 3:19 PM

LGTM

This revision is now accepted and ready to land.Sep 14 2017, 3:19 PM
EricWF closed this revision.Sep 14 2017, 3:20 PM

This function was added to the header recently, but it has been provided by ASan runtime library since the beginning. Why not simply declare it in libc++abi?

This function was added to the header recently, but it has been provided by ASan runtime library since the beginning. Why not simply declare it in libc++abi?

I didn't know that. I'll come up with a separate patch set for that then.