[LLVMdev] dynamic_cast error detection

Duncan Sands baldrick at free.fr
Sun Sep 2 01:02:29 PDT 2012


Hi Akos, you should send this to the clang mailing list instead.

Ciao, Duncan.

> 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
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list