<div dir="ltr">Hey Will,<div><br></div><div>I'm using vanilla clang/compiler-rt, not the "always link in ubsan" workaround.</div><div><br></div><div>It now compiles and runs my unit tests! However, using std::fixed like this:<br>
<br>#include <iostream><br><br>int main()<br>{<br> std::cout << std::fixed;<br> return 0;<br>}<br><br>Gives this error message:<br><br>$ clang++ -g -fsanitize=undefined foo.cpp && ./a.out<br><br>
==15067== WARNING: Trying to symbolize code, but external symbolizer is not initialized!<br><br>/home/martin/cache/lib/a.out:0x402918: runtime error: load of value 4294967035, which is not a valid value for type 'std::_Ios_Fmtflags'<br>
/home/martin/cache/lib/a.out:0x402b44: runtime error: load of value 4294967035, which is not a valid value for type 'std::_Ios_Fmtflags'<br></div>
<div><br>Two questions:<br><br></div><div>Should I ignore the warning, if not, how do I fix it?<br></div><div><br></div><div>Is there a way to suppress messages from the standard library? I'm guessing not, but I can write a quick script on my end to filter them out.<br>
</div><div><br></div><div>Best,<br>Martin<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 17, 2013 at 12:19 PM, Will Dietz <span dir="ltr"><<a href="mailto:willdtz@gmail.com" target="_blank">willdtz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Bah, missed one! :). Thanks Alexey, fixed in r172730.<br>
<br>
Martin, can you update and try now? Let me know if you have any<br>
further linking issues.<br>
<br>
As an aside, are you using vanilla clang/compiler-rt, or did you need<br>
to apply the "always link in ubsan" workaround discussed in this<br>
thread?<br>
<br>
Thanks, happy code checking! :)<br>
<span><font color="#888888"><br>
~Will<br>
</font></span><div><div><br>
On Thu, Jan 17, 2013 at 9:21 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:<br>
><br>
> On Thu, Jan 17, 2013 at 7:02 PM, Martin Martin<br>
> <<a href="mailto:martin@silverliningsystems.com" target="_blank">martin@silverliningsystems.com</a>> wrote:<br>
>><br>
>> Any word on this linking error? Would a test case help?<br>
>><br>
>> Thanks,<br>
>> Martin<br>
>><br>
>><br>
>><br>
>> On Sat, Jan 12, 2013 at 4:40 PM, Martin Martin<br>
>> <<a href="mailto:martin@silverliningsystems.com" target="_blank">martin@silverliningsystems.com</a>> wrote:<br>
>>><br>
>>> Great, that works! The next linking error I get is:<br>
>>><br>
>>> hidden symbol `__ubsan_vptr_type_cache' in<br>
>>> /home/martin/clang/build/bin/../lib/clang/3.3/lib/linux/libclang_rt.ubsan-x86_64.a(ubsan_type_hash.cc.o)<br>
>>> is referenced by DSO<br>
><br>
><br>
> Just a random guess - would adding SANITIZER_INTERFACE_ATTRIBUTE to<br>
> __ubsan_vptr_type_cache definition help? Like this:<br>
> extern "C" SANITIZER_INTERFACE_ATTRIBUTE HashValue<br>
> __ubsan_vptr_type_cache[VptrTypeCacheSize];<br>
><br>
><br>
>>><br>
>>><br>
>>> It's a little trouble for me to narrow down the test case, but I'm happy<br>
>>> to do it if it helps.<br>
>>><br>
>>> Thanks,<br>
>>> Martin<br>
>>><br>
>><br>
>> _______________________________________________<br>
>> cfe-dev mailing list<br>
>> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Alexey Samsonov, MSK<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
</div></div></blockquote></div><br></div></div>