5 ms·
very informative,also there is __GLIBCXX_DEBUG etc to catch errors sanitizer can not detect
by synergy20 3y ago
very informative,also there is __GLIBCXX_DEBUG etc to catch errors sanitizer can not detect
- dundarious 3y agoIt's _GLIBCXX_DEBUG (one leading underscore) and it's not a good idea to use it in release builds, unlike the original comment's proposal.
- dwheeler 3y agoWe did include `-D_GLIBCXX_ASSERTIONS` but we intentionally did not include `-D_GLIBCXX_DEBUG`, because we've been focusing on production releases. The current plan is to add more information distinguishing between production code and instrumented test code, and adding options specific to each. There are many options that might make sense for instrumented test code that don't make sense for production code (and vice versa).
- synergy20 3y agotypically for production releases I have -DNDEBUG, which will disable -D_GLIBCXX_ASSERTIONS