[LLVMdev] dynamic_cast error detection
Somorjai, Akos
ASomorjai at graphisoft.com
Thu Aug 30 09:00:45 PDT 2012
Hi all,
I'm trying to convert our code base from GCC 4.0 to LLVM (on mac OS X), and ran into a problem. In the past we used mach_override and the dynamic_cast source to override the built-in dynamic_cast operator to detect shared library issues (http://gcc.gnu.org/faq.html#dso). Basically we'd assert at runtime when a duplicated RTTI is found, giving us a chance to backtrace the offending class.
I'm looking for a better solution with llvm; I know about -Wweak–vtables, but compiling with it gives me hundreds of errors, and some of them are false positives.
So is there any legal way of catching dynamic_cast problems? Maybe dyld_interposing? I'd like to avoid replacing all dynamic_casts with another call if possible (because there are several hundreds of those calls).
Thanks in advance, Akos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120830/37581d64/attachment.html>
More information about the llvm-dev
mailing list