[SERVER-12189] For debug builds using libstdc++, enable the debugging features in that library Created: 22/Dec/13  Updated: 19/May/22  Resolved: 11/Apr/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.7.0

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-5851 Define _GLIBCXX_DEBUG in debug builds Closed
Related
related to SERVER-15263 Guard setting -D_GLIBCXX_DEBUG behind... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The libstdc++ library offers debugging versions of containers and iterators, much like the windows standard library. The windows library does periodically catch bugs for us, but typically as a breaking commit on MCI.

Since many developers work primarily against libstdc++, we should consider enabling its debugging features to try to catch similar errors sooner:

http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html

One restriction is that I think we can only do this when we are building against our vendored versions of C++ libraries, but that isn't too hard to enforce.



 Comments   
Comment by Githook User [ 11/Apr/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-12189 Enable libstdc++ debugging features for debug builds when possible
Branch: master
https://github.com/mongodb/mongo/commit/911bbc14a87ded7d53066d9e23ca9cd942107da4

Comment by Andrew Morrow (Inactive) [ 09/Apr/14 ]

Per discussion with Andy, lets try to do this in 2.7

Comment by Andrew Morrow (Inactive) [ 09/Jan/14 ]

The older ticket has less info, so I'm inclined to keep this one. There is Eric's note about thread safety issues in the other ticket, but most of the posts I've seen about that seem to be fairly old.

We should at least try this in 2.7. We can always put it up under a SCons flag and turn on a dedicated builder for a while and see how it goes.

Generated at Thu Feb 08 03:27:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.