This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/59106] Failure to link against static libasan
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Nov 2013 12:02:35 +0000
- Subject: [Bug sanitizer/59106] Failure to link against static libasan
- Auto-submitted: auto-generated
- References: <bug-59106-4 at http dot gcc dot gnu dot org/bugzilla/>
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.