[cfe-dev] -fsanitize=undefined and shared libraries

Will Dietz willdtz at gmail.com
Thu Jan 17 09:19:20 PST 2013


Bah, missed one! :).  Thanks Alexey, fixed in r172730.

Martin, can you update and try now?  Let me know if you have any
further linking issues.

As an aside, are you using vanilla clang/compiler-rt, or did you need
to apply the "always link in ubsan" workaround discussed in this
thread?

Thanks, happy code checking! :)

~Will

On Thu, Jan 17, 2013 at 9:21 AM, Alexey Samsonov <samsonov at google.com> wrote:
>
> On Thu, Jan 17, 2013 at 7:02 PM, Martin Martin
> <martin at silverliningsystems.com> wrote:
>>
>> Any word on this linking error?  Would a test case help?
>>
>> Thanks,
>> Martin
>>
>>
>>
>> On Sat, Jan 12, 2013 at 4:40 PM, Martin Martin
>> <martin at silverliningsystems.com> wrote:
>>>
>>> Great, that works!  The next linking error I get is:
>>>
>>>  hidden symbol `__ubsan_vptr_type_cache' in
>>> /home/martin/clang/build/bin/../lib/clang/3.3/lib/linux/libclang_rt.ubsan-x86_64.a(ubsan_type_hash.cc.o)
>>> is referenced by DSO
>
>
> Just a random guess - would adding SANITIZER_INTERFACE_ATTRIBUTE to
> __ubsan_vptr_type_cache definition help? Like this:
> extern "C" SANITIZER_INTERFACE_ATTRIBUTE HashValue
> __ubsan_vptr_type_cache[VptrTypeCacheSize];
>
>
>>>
>>>
>>> It's a little trouble for me to narrow down the test case, but I'm happy
>>> to do it if it helps.
>>>
>>> Thanks,
>>> Martin
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
>
> --
> Alexey Samsonov, MSK
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list