[cfe-dev] In libc++ is std::make_shared supposed to have a dependency on RTTI?
Jonathan Sauer
jonathan.sauer at gmx.de
Mon Oct 10 23:27:32 PDT 2011
Hello,
> During migrating some code from various hand rolled smart pointers to
> C++11 stuff I noticed a crash, and I am not sure if it is due to a bug
> in libc++ or me not understanding some of the dependencies in the new
> C++ standard. I was seeing crashes in ~shared_ptr, it appears to be
> walking into garbage, presumably looking for type info (the code has
> always been compiled -fno-rtti). If I turn on RTTI it goes away, and
> if I manually construct the shared_ptr instead of using make_shared it
> also goes away.
I think this was fixed in a recent change to libc++. What revision of it do
you use?
If it's not possible for you to upgrade to a newer libc++ revision, you should
be able to solve the problem by recompiling libc++ without RTTI (meaning you
would have two versions of it: libc++.rtti and libc++.north).
Jonathan
More information about the cfe-dev
mailing list