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

zapadinsky zapadinsky at gmail.com
Mon Jan 28 09:32:00 PST 2013


>> The issue is we emit overflow intrinsics that aren't neatly supported
>> on the platform and so a call to the supporting runtime is emitted
>> instead.  Unfortunately libgcc doesn't implement __mulodi4
>> (compiler-rt does) resulting in the undefined reference you're seeing.

>Yes, I've seen this too. The easiest solution might be to include
>compiler-rt's mulodi4.o in libclang_rt.ubsan.*.a. -- that's the approach
>I've been using when testing UBSan -- although this doesn't fix the problem
>for code not using UBSan.

ar rs libclang_rt.ubsan-i386.a mulodi4.o has solved the problem, thanks! If
ubsan is so dependent from this implementation may be it should be added to
the make script?




--
View this message in context: http://clang-developers.42468.n3.nabble.com/fsanitize-undefined-and-shared-libraries-tp4029561p4030108.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list