[llvm-dev] Where does the LLVM implement the Ubsan's instrumentations?

John Regehr via llvm-dev
2017-07-21T01:55:44Z

Most of UBSan runs in the late parts of Clang, see the lib/CodeGen
directory.

> 2.            My firmware usage scenario is quite sensitive to the code
> size. Does the Ubsan have the build option to use callbacks instead of
> inline code for the Ubsan instrumentations (like Asan's
> -asan-instrumentation-with-call-threshold=0) ?

I think your best bet for controlling code bloat is to compile with
-fsanitize=undefined -fsanitize-trap=undefined.

John