Bug 56109 - Add light-weight ABI-compatible debug checks to standard containers
Summary: Add light-weight ABI-compatible debug checks to standard containers
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Jonathan Wakely
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 14:48 UTC by Paul Pluzhnikov
Modified: 2015-09-09 17:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-10-13 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pluzhnikov 2013-01-25 14:48:33 UTC
Google has implemented a series of patches which allows us to catch many STL mis-use bugs cheaply and in ABI-compatible way:

http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01186.html
http://gcc.gnu.org/ml/gcc-patches/2013-01/msg01074.html and more ...
(just look for __google_stl in google/integration branch).

Some of the bugs we catch this way are not visible to "standard" tools like Valgrind and AddressSanitizer.

These bugs (and more) *are* visible to _GLIBCXX_DEBUG mode, but we've not been able to use that mode due to source incompatibilities, and it has ABI implications as well.

Please consider adding a light-weight ABI-compatible debug mode to trunk, once it re-opens for stage 1.
Comment 1 Jonathan Wakely 2014-10-13 14:22:09 UTC
Confirmed.

c.f. https://gcc.gnu.org/ml/libstdc++/2014-06/msg00105.html
Comment 2 Jonathan Wakely 2015-09-09 17:15:33 UTC
As of r227595 trunk now supports a _GLIBCXX_ASSERTIONS macro that enables lightweight checks. We will start merging some of the __google_stl checks to trunk and enabling them with that macro (which might give you a number of merge conflicts on your branch, sorry!)