This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/53324] Crash when mixing _GLIBCXX_DEBUG and non-_GLIBCXX_DEBUG std::deque


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53324

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-11 17:20:13 UTC ---
N.B. this is basically the same scenario as if you compiled x.C, then changed
XX::getme to return a std::list instead of std::deque, then compiled y.C -- it
would link, but crash at runtime.  This is a general "feature" of C++
name-mangling and separrate compilation, not specific to our debug mode.

If you create a file called "deque" in the same directory containing:

#include <list>
#define deque list

then change the makefile to build y.o with this rule, not using debug mode:

y.o: y.C
        g++ -c  -I. y.C

then it will link (even though you can't assign std::list to std::deque, i.e.
your suggestion won't help) but it will segfault when run.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]