http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59106

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Alexey Samsonov from comment #4)
> Yeah, in LLVM/Clang we build C++-specific part of UBSan with -frtti (and
> link it to C++ programs only), and the rest sanitizers with -fno-rtti.

Can't we just add asm (".weak _Z..."); to the ubsan source that needs C++ and
perhaps check if those symbols are non-NULL, otherwise simply fail the dynamic
type checking?
Then libubsan wouldn't require libstdc++, but, supposedly if you call the ubsan
C++ diagnostics, you'd have libstdc++ or libsupc++ linked in and it would DTRT.

Reply via email to