[libcxx-commits] [PATCH] D103002: [libunwind] Inform ASan that resumption is noreturn
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 24 17:47:59 PDT 2021
smeenai updated this revision to Diff 347535.
smeenai added a comment.
Lint
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103002/new/
https://reviews.llvm.org/D103002
Files:
libunwind/src/libunwind.cpp
Index: libunwind/src/libunwind.cpp
===================================================================
--- libunwind/src/libunwind.cpp
+++ libunwind/src/libunwind.cpp
@@ -16,6 +16,9 @@
#include <stdlib.h>
+#if __has_feature(address_sanitizer)
+#include <sanitizer/asan_interface.h>
+#endif
#if !defined(__USING_SJLJ_EXCEPTIONS__)
#include "AddressSpace.hpp"
@@ -184,6 +187,10 @@
/// Resume execution at cursor position (aka longjump).
_LIBUNWIND_HIDDEN int __unw_resume(unw_cursor_t *cursor) {
_LIBUNWIND_TRACE_API("__unw_resume(cursor=%p)", static_cast<void *>(cursor));
+#if __has_feature(address_sanitizer)
+ // Inform the ASan runtime that now might be a good time to clean stuff up.
+ __asan_handle_no_return();
+#endif
AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
co->jumpto();
return UNW_EUNSPEC;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103002.347535.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210525/21ea3f57/attachment.bin>
More information about the libcxx-commits
mailing list