Clang 3.6 and undefined symbol "ubsan::checkDynamicType"

Hi Everyone,

I download and built Clang 3.6 from sources . The recipe can be found
at Clang 3.6 Recipe (Final) - The recipe fetches components with
wget, unpacks in them in the proper directory, configures, and kicks
off a build. The components are LLVM, CFE (Clang, front end),
Compiler-RT and Tools Extras.

I'm trying to use the Clang 3.6 Undefined and Address sanitizers. Link
is failing with the errors shown below.

The link rule include CXXFLAGS, so the sanitizer switches are being
passed through the compiler driver:

cryptest.exe: libcryptopp.a $(TESTOBJS)
    $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)

And is on path:

$ find /usr/local/ -iname libclang_rt.ubsan_osx.a

Any ideas what I am doing wrong?

Thanks in advance.

Try linking with -lc++abi. Note that recently (in trunk, i.e. in upcoming Clang 3.7) we’ve significantly changed the way ASan/UBSan are used:

I’d appreciate if you could test your example with trunk and report any problems.