<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 5:27 PM, Ben Pope <span dir="ltr"><<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tuesday, May 05, 2015 12:08 AM, Alexey Samsonov wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Ben,<br>
<br>
On Sun, May 3, 2015 at 9:52 PM, Ben Pope<br>
<<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a><br></span><span class="">
<mailto:<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a>>> wrote:<br>
<br>
    When I run with UBSAN over the Boost libraries, I get a lot of<br>
    output of the form:<br>
    ==20717==Sanitizer CHECK failed:<br>
    /home/ben/development/llvm/trunk/llvm/projects/compiler-rt/lib/ubsan/ubsan_init.cc:60<br>
    ((UBSAN_MODE_UNKNOWN)) != ((ubsan_mode)) (0, 0)<br>
<br>
    I'm not sure what's going wrong, I was expecting something more<br>
    descriptive!<br>
<br>
<br>
Right, I should probably add more descriptive error message...<br>
<br>
Can you provide the details of how you compile<br>
your source files and link them into libraries and executable? It looks<br>
like your executable is linked with both UBSan<br>
runtime and ASan runtime. It can happen if the link flags used were<br>
inconsistent, or you mix libraries/executables<br>
built with different versions of Clang.<br>
</span></blockquote>
<br>
It's not impossible, but I don't think I'm linking both runtimes.<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Here's an example:<br>
<a href="http://www.boost.org/development/tests/develop/developer/output/BenPope%20x86_64%20Ubuntu-boost-bin-v2-libs-algorithm-test-all_of_test-test-clang-linux-3-7~ubsan~c14_libc++-debug.html" target="_blank">http://www.boost.org/development/tests/develop/developer/output/BenPope%20x86_64%20Ubuntu-boost-bin-v2-libs-algorithm-test-all_of_test-test-clang-linux-3-7~ubsan~c14_libc++-debug.html</a></blockquote><div><br></div><div><br></div><div>Indeed, looks like the compile/link commands are reasonable, and the problem is somewhere else. On Linux, we assume that UBSan runtime will</div><div>be initialized by calling __ubsan::InitAsStandalone() from .preinit_array section (i.e. very early), and that subsequent calls to __ubsan::InitAsStandaloneIfNecessary() will</div><div>effectively be a no-op. Apparently, this assumption doesn't hold in your case.</div><div><br></div><div>Can you send me a stack trace of this CHECK-failure? (i.e. run the executable under gdb and fetch stack trace from it).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
Ben<br>
<br>
<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@cs.uiuc.edu" target="_blank">cfe-users@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>