[compiler-rt] r202122 - Enable UBSan on FreeBSD. Patch by Viktor Kutuzov.

Ivan A. Kosarev ivan at ivan-labs.com
Wed Feb 26 06:07:01 PST 2014


On 02/26/2014 02:19 AM, Roman Divacky wrote:
> I tried to use ubsan and
>
> 1) compiler-rt doesnt compile for me, I need this patch:
>
> Index: ../projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Yes, it's still on review:

http://llvm-reviews.chandlerc.com/D2831

> 2) the clang driver doesnt add sanitizer arguments:
>
> Index: ../tools/clang/lib/Driver/Tools.cpp

Right, this is a subject for further work:

http://llvm-reviews.chandlerc.com/D2644

> 3) Even with the above, it doesnt work because addSanitizerRuntimes() is not adjusted
> for freebsd (ie. it looks for sanitizer libs in freebsd9.2 instead of freebsd dir and
> tries to add -ldl which doesn exist on freebsd)
>
> 4) even when I correct that (manually), ubsan doesnt link with lots of undefined symbols,
> eg.:
>
> __sanitizer::StackTrace::SlowUnwindStackWithContext etc.
>
>
> Can you shed some light on the status?

The work is in progress. In short, the plan is first build the run-time 
sources ('make'), then build the unit tests (starting from 'make 
check-asan') and then resolve test failures. We are on the first phase, 
currently.

Thanks.

-- 




More information about the llvm-commits mailing list