[cfe-dev] recent change broke -fcatch-undefined-behavior
Jean-Daniel Dupas
devlists at shadowlab.org
Mon Oct 15 11:39:21 PDT 2012
Le 15 oct. 2012 à 19:55, Sean McBride <sean at rogue-research.com> a écrit :
> Hi all,
>
> I see that there have been recent changes wrt -fcatch-undefined-behavior, and within the last week or so something changed such that my own build of clang (built with CMake on OS X) is unable to build simple programs that use -fcatch-undefined-behavior, I get link errors like:
>
> "___ubsan_handle_divrem_overflow", referenced from:
> _main in test-OSZvjm.o
> "___ubsan_handle_type_mismatch", referenced from:
> _main in test-OSZvjm.o
>
> Any ideas why?
>
This is a new feature. Instead of generating traps, -fcatch-undefined-behavior generates library calls that make it easier to find what is wrong (each undefined behavior calls a different function).
This functions are provided by the ubsan library that is part of compiler-rt. But I'm not sure the integration to the Makefile build system is done yet.
-- Jean-Daniel
More information about the cfe-dev
mailing list