This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Runtime crashes when mixing _GLIBCXX_DEBUG settings


On 10/10/2012 06:15 PM, Jonathan Wakely wrote:
>> My understanding from the documentation of the debug feature of the
>> library is that this shouldn't be able to happen: mixed _GLIBCXX_DEBUG
>> settings should either work or cause a linker error. Is this true? If
> 
> Mangled names don't include function return types, so it's entirely
> possible to get crashes still, the system isn't foolproof.
> 
> To know if you've found a real problem or not we'd need a testcase.

Ah, okay. The documentation made it sound to me like "our design *will*
either work or cause a linker error" rather than "we make a good
attempt, but there are some things that slip through the cracks". We use
STL containers as class members a lot, so if that can get by the
"checking" that the linker does, that sounds like a likely cause to me.


>> so, should I try to reduce the broken example to get something that's
>> reportable as a bug? Or is this just one of those "don't do that"
>> things? (And in the latter case, any suggestions for how to detect the
>> problem? With MSVC, I'd use a '#pragma detect_mismatch' in their setup
>> to prevent intermixing of the debug and release library, though I am
>> unsure of what happens when you introduce libraries to the picture.)
> 
> I already answered that part on Stackoverflow.

Well, you gave an alternative way of getting a somewhat similar result
as using _GLIBCXX_DEBUG. :-) (Don't take my re-asking the question here
to say that I don't appreciate your answers here or there BTW, because I
definitely do appreciate the time taken. I just figured if someone saw
it here but not there, they might have a trick up their sleeve. I also
didn't know that you were involved with GCC/stdlibc++ enough to watch
this list.)

Evan

Attachment: signature.asc
Description: OpenPGP digital signature


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