Skip to content

Use cxx library debug hardening in debug builds#6036

Open
prckent wants to merge 3 commits into
QMCPACK:developfrom
prckent:cxx_lib_debug
Open

Use cxx library debug hardening in debug builds#6036
prckent wants to merge 3 commits into
QMCPACK:developfrom
prckent:cxx_lib_debug

Conversation

@prckent

@prckent prckent commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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?

  • Build related changes
  • Testing changes (e.g. new unit/integration/performance tests)

Does this introduce a breaking change?

  • Yes

Break default debug builds because bugs are caught.

What systems has this change been tested on?

nitrogen2, gcc15.2 no mpi.

Checklist

    • I have read the pull request guidance and develop docs
    • This PR is up to date with the current state of 'develop'
    • Code added or changed in the PR has been clang-formatted
    • This PR adds tests to cover any new code, or to catch a bug that is being fixed
    • Documentation has been added (if appropriate)

@prckent
prckent marked this pull request as draft July 10, 2026 13:45
@prckent
prckent marked this pull request as ready for review July 13, 2026 01:02
@prckent

prckent commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

#6041 should allow this to pass in CI

@prckent

prckent commented Jul 17, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants