MDEV-33974 Enable GNU libstdc++ debugging #3219
Merged
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.
Description
On GCC 10 or later, let us enable
_GLIBCXX_DEBUG
as well as_GLIBCXX_ASSERTIONS
which have an impact on the GNUlibstdc++
. This should catch bugs like the one that commit 455a15f fixed.For the clang libc++ before clang-15 there was
_LIBCPP_DEBUG
, but according to llvm/llvm-project@f3966ea and llvm/llvm-project@13ea134 and llvm/llvm-project@ff573a4 it looks like that for proper results, a specially built debug version oflibc++
would have to be used in order to enable equivalent checks.Release Notes
Debug builds will try to catch some C++ API misuse in GNU libstdc++ when using GCC 10 or later.
How can this PR be tested?
./mtr innodb.insert_into_empty
is expected to crash as long as the commit 455a15f is not included. However, for some reason it did not crash on our CI. I tested 35aa7d6 in the amd64-ubuntu-2004-debug environment with an additional bug injection:This would fail during the server bootstrap:
Basing the PR against the correct MariaDB version
This has been tested on 10.11, but the final version will target the 10.5 branch and not the earliest maintained branch 10.4 because it is so close to end-of-life.
PR quality check