Use cxx library debug hardening in debug builds#6036
Open
prckent wants to merge 3 commits into
Open
Conversation
prckent
marked this pull request as draft
July 10, 2026 13:45
prckent
marked this pull request as ready for review
July 13, 2026 01:02
Contributor
Author
|
#6041 should allow this to pass in CI |
Contributor
Author
|
Noting that unfortunately MPI builds look to be broken due to problems either directly in src/io/hdf/hdf_archive.cpp, or the wrappers and libraries below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Enable standard library hardening options in debug builds. These add additional assertions to avoid violations of standard library expectations. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html and https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html
Currently a draft because many CI configurations will fail. Also to advertise the problems, show the direction and eventually see what happens to CI runtimes. e.g. the coverage builds are also debug builds.
Unfortunately LMYENGINE/formic contains bugs/naughtiness that are now caught at build time, at least with GCC 15.2. -DBUILD_LMYENGINE_INTERFACE=0 is required for successful builds. This also demonstrates that we have problems sneaking through our current set of defenses. The bugs will need to be fixed or perhaps worked around before this PR can be merged. I have not yet looked to see how problematic the bugs are.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
Break default debug builds because bugs are caught.
What systems has this change been tested on?
nitrogen2, gcc15.2 no mpi.
Checklist