<div dir="ltr">The bot is unhappy: <div><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7880/steps/build%20libcxx%2Fasan/logs/stdio">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7880/steps/build%20libcxx%2Fasan/logs/stdio</a><br></div><div><pre style="font-family:"Courier New",courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="gmail-stdout">1/6] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o
FAILED: projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o 
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build0/bin/clang++   -DHAVE___CXA_THREAD_ATEXIT_IMPL -D_DEBUG -D_GNU_SOURCE -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCXXABI_BUILDING_LIBRARY -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/libcxxabi/src -I/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/libcxxabi/src -I/usr/include/libxml2 -Iinclude -I/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include -I/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/libcxxabi/include -I/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/libcxx/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fno-omit-frame-pointer -gline-tables-only -fsanitize=address -fsanitize-address-use-after-scope -fcolor-diagnostics -ffunction-sections -fdata-sections  -O3  -fPIC   -UNDEBUG -nostdinc++ -Werror=return-type -W -Wall -Wchar-subscripts -Wconversion -Wmismatched-tags -Wmissing-braces -Wnewline-eof -Wunused-function -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings -Wundef -Wno-error -pedantic -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -std=c++11 -MD -MT projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o -MF projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o.d -o projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o -c /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/libcxxabi/src/cxa_exception.cpp
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/libcxxabi/src/cxa_exception.cpp:227:5: error: use of undeclared identifier '__asan_handle_no_return'
    __asan_handle_no_return();
    ^</span></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 13, 2017 at 4:35 PM, Petr Hosek via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: phosek<br>
Date: Wed Sep 13 16:35:07 2017<br>
New Revision: 313215<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=313215&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=313215&view=rev</a><br>
Log:<br>
Reland "When built with ASan, __cxa_throw calls __asan_handle_no_return"<br>
<br>
The ASan runtime on many systems intercepts cxa_throw just so it<br>
can call asan_handle_no_return first. Some newer systems such as<br>
Fuchsia don't use interceptors on standard library functions at all,<br>
but instead use sanitizer-instrumented versions of the standard<br>
libraries. When libc++abi is built with ASan, cxa_throw can just<br>
call asan_handle_no_return itself so no interceptor is required.<br>
<br>
Patch by Roland McGrath<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D37229" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D37229</a><br>
<br>
Modified:<br>
    libcxxabi/trunk/src/cxa_<wbr>exception.cpp<br>
<br>
Modified: libcxxabi/trunk/src/cxa_<wbr>exception.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=313215&r1=313214&r2=313215&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxxabi/trunk/src/<wbr>cxa_exception.cpp?rev=313215&<wbr>r1=313214&r2=313215&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- libcxxabi/trunk/src/cxa_<wbr>exception.cpp (original)<br>
+++ libcxxabi/trunk/src/cxa_<wbr>exception.cpp Wed Sep 13 16:35:07 2017<br>
@@ -19,6 +19,10 @@<br>
 #include "cxa_handlers.hpp"<br>
 #include "fallback_malloc.h"<br>
<br>
+#if __has_feature(address_<wbr>sanitizer)<br>
+#include <sanitizer/asan_interface.h><br>
+#endif<br>
+<br>
 // +---------------------------+-<wbr>----------------------------+-<wbr>--------------+<br>
 // | __cxa_exception           | _Unwind_Exception CLNGC++\0 | thrown object |<br>
 // +---------------------------+-<wbr>----------------------------+-<wbr>--------------+<br>
@@ -217,6 +221,12 @@ __cxa_throw(void *thrown_object, std::ty<br>
     globals->uncaughtExceptions += 1;   // Not atomically, since globals are thread-local<br>
<br>
     exception_header-><wbr>unwindHeader.exception_cleanup = exception_cleanup_func;<br>
+<br>
+#if __has_feature(address_<wbr>sanitizer)<br>
+    // Inform the ASan runtime that now might be a good time to clean stuff up.<br>
+    __asan_handle_no_return();<br>
+#endif<br>
+<br>
 #ifdef __USING_SJLJ_EXCEPTIONS__<br>
     _Unwind_SjLj_RaiseException(&<wbr>exception_header-><wbr>unwindHeader);<br>
 #else<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>