Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884417 - [Tracker] Failures with -D_GLIBCXX_ASSERTIONS
Summary: [Tracker] Failures with -D_GLIBCXX_ASSERTIONS
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PullRequest, Tracker
Depends on: 792744 893156 893398 896172 897758 897780 897782 796653 872287 884419 887815 893370 895128 896382 915815 922679
Blocks:
  Show dependency tree
 
Reported: 2022-12-05 08:00 UTC by Sam James
Modified: 2024-01-24 10:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-05 08:00:46 UTC
-D_GLIBCXX_ASSERTIONS enables assertions in libstdc++ which can catch inconsistencies and unexpected runtime state.

Fedora has used it for their packages for quite a while (with the endorsement of the libstdc++ maintainer).
Comment 1 Larry the Git Cow gentoo-dev 2022-12-28 19:35:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=224f6241ec785ccc386eb191df36d919e9b62351

commit 224f6241ec785ccc386eb191df36d919e9b62351
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-28 17:54:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-28 17:54:22 +0000

    12.2.0: add patches for FORTIFY_SOURCE=3, default GLIBCXX_ASSERTIONS
    
    Bug: https://bugs.gentoo.org/876895
    Bug: https://bugs.gentoo.org/884417
    Bug: https://bugs.gentoo.org/847148
    Bug: https://bugs.gentoo.org/876893
    Signed-off-by: Sam James <sam@gentoo.org>

 12.2.0/gentoo/01_all_default-fortify-source.patch        |  8 ++++++--
 12.2.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++++++++++++++
 12.2.0/gentoo/README.history                             |  4 ++++
 3 files changed, 24 insertions(+), 2 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2022-12-31 23:49:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a40e388337e2fc6847c6cd48fc1b19eafc55b1c6

commit a40e388337e2fc6847c6cd48fc1b19eafc55b1c6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-28 19:18:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-31 23:47:03 +0000

    sys-devel/gcc: add 12.2.1_p20221231, USE=hardened changes
    
    USE=hardened will now imply:
    - default -D_FORTIFY_SOURCE=3 (instead of 2 for normal profiles)
    - default -D_GLIBCXX_ASSERTIONS
    
    Bug: https://bugs.gentoo.org/876895
    Bug: https://bugs.gentoo.org/884417
    Bug: https://bugs.gentoo.org/847148
    Bug: https://bugs.gentoo.org/876893
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  2 ++
 sys-devel/gcc/gcc-12.2.1_p20221231.ebuild | 52 +++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288bc9aff2e91f6a443e8c09f080ffc9f633b07e

commit 288bc9aff2e91f6a443e8c09f080ffc9f633b07e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-28 19:17:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-31 23:30:45 +0000

    toolchain.eclass: prepare for USE=hardened => FORTIFY_SOURCE=3, assertions
    
    USE=hardened will now imply:
    - default -D_FORTIFY_SOURCE=3 (instead of 2 for normal profiles)
    - default -D_GLIBCXX_ASSERTIONS
    
    Bug: https://bugs.gentoo.org/876895
    Bug: https://bugs.gentoo.org/884417
    Bug: https://bugs.gentoo.org/847148
    Bug: https://bugs.gentoo.org/876893
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 4 ++++
 1 file changed, 4 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2023-01-30 17:37:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ffccf8150c87234124ba1a72b11b829bb17dd15

commit 3ffccf8150c87234124ba1a72b11b829bb17dd15
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-30 01:10:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-30 17:37:04 +0000

    toolchain-funcs.eclass: add tc-enables-cxx-assertions
    
    Bug: https://bugs.gentoo.org/884417
    Bug: https://bugs.gentoo.org/876895
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain-funcs.eclass | 9 +++++++++
 1 file changed, 9 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-11-14 21:28:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7c0d71054fd98e8105ccf7a6173aa6e42bff146

commit d7c0d71054fd98e8105ccf7a6173aa6e42bff146
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-11-14 21:26:52 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-11-14 21:27:41 +0000

    dev-libs/libnop: Failures with -D_GLIBCXX_ASSERTIONS
    
    Closes: https://bugs.gentoo.org/884417
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 dev-libs/libnop/files/libnop-2021.11.03-libstdc++.patch | 11 +++++++++++
 dev-libs/libnop/libnop-2021.11.03.ebuild                |  2 ++
 2 files changed, 13 insertions(+)