[cfe-dev] MSVC RTTI implementation status

Domagoj Saric domagoj.saric at littleendian.com
Mon Feb 24 23:53:32 PST 2014


On 24.2.2014. 17:35, David Blaikie wrote:
> Are you suggesting Clang crashes, or Clang produces a program that crashes?

Clang produces a program that crashes.


> In any case, I don't think either would be intended - you should either get a
> compile-time error (because the type isn't dynamic) or a runtime check (null or
> non-null, not a crash).

Perhaps the culprit isn't Clang but simply in the (RTTI) ABI and/or the 
implementation of dynamic_cast in libstdc++ (the old one in OSX)...
The problem basically appears if you have a polymorphic type in a TU compiled 
with -fno-rtti and you pass a pointer to such an object to a function in a TU 
compiled with -frtti which calls dynamic_cast on it...


-- 
Domagoj Saric
Software Architect
www.LittleEndian.com





More information about the cfe-dev mailing list