Skip to content

build: disable libstdc++ debug containers globally - #30147

Closed
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:fix30056
Closed

build: disable libstdc++ debug containers globally#30147
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:fix30056

Conversation

@bnoordhuis

Copy link
Copy Markdown
Member

Make sure _GLIBCXX_DEBUG is (un)defined consistently by turning the
disable_glibcxx_debug in common.gypi into a global variable that
overrides the definition in toolchain.gypi.

Different parts of the debug build were using differently sized
std::vectors and that ended about as well as you would expect.

Fixes: #30056

@nodejs-github-botnodejs-github-bot added the build Issues and PRs related to build files or the CI. label Oct 27, 2019
@nodejs-github-bot

This comment has been minimized.

@Fishrock123Fishrock123 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 19, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@BridgeAR

Copy link
Copy Markdown
Member

@BridgeARBridgeAR removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 10, 2019
@BridgeAR

Copy link
Copy Markdown
Member

Ping @bnoordhuis

@BridgeAR

Copy link
Copy Markdown
Member

@bnoordhuis PTAL at the mentioned failure.

@nodejs-github-bot

This comment has been minimized.

Different parts of the debug build were using differently sized
std::vectors due to `_GLIBCXX_DEBUG` sometimes being defined and
sometimes not. That ended about as well as you would expect.
Remove the flag.
Fixes: nodejs#30056
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

Thanks for the ping, Ruben, and sorry for the delay. I decided to simply remove the setting since we want it disabled anyway.

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 12, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@BridgeAR

Copy link
Copy Markdown
Member

It would be good to get a confirmation of some of the LGs, since this has changed since the PR was opened.

Comment threadcommon.gypi

# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
# between debug and non-debug mode.
'disable_glibcxx_debug': 1,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this may not have had the desired effect (being overridden by the value in toolchain.gypi) but I'm a little hesitant about removing it completely from common.gypi from the release lines as that's visible to addon authors using node-gyp.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not an exact science but GH search doesn't turn up any binding.gyp files nor any JS or TS source files that contain the string disable_glibcxx_debug.

I think it's a pretty safe bet it's unused because it was non-functional anyway.

@BridgeARBridgeAR removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 12, 2020
@bnoordhuisbnoordhuis added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 9, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax pushed a commit that referenced this pull request Mar 12, 2020
Different parts of the debug build were using differently sized
std::vectors due to `_GLIBCXX_DEBUG` sometimes being defined and
sometimes not. That ended about as well as you would expect.
Remove the flag.
Fixes: #30056
PR-URL: #30147
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@addaleax

Copy link
Copy Markdown
Member

Landed in 7f44d2c

BridgeAR pushed a commit that referenced this pull request Mar 17, 2020
Different parts of the debug build were using differently sized
std::vectors due to `_GLIBCXX_DEBUG` sometimes being defined and
sometimes not. That ended about as well as you would expect.
Remove the flag.
Fixes: #30056
PR-URL: #30147
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorinsMylesBorins mentioned this pull request Mar 19, 2020
MylesBorins pushed a commit that referenced this pull request Mar 24, 2020
Different parts of the debug build were using differently sized
std::vectors due to `_GLIBCXX_DEBUG` sometimes being defined and
sometimes not. That ended about as well as you would expect.
Remove the flag.
Fixes: #30056
PR-URL: #30147
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Apr 22, 2020
Different parts of the debug build were using differently sized
std::vectors due to `_GLIBCXX_DEBUG` sometimes being defined and
sometimes not. That ended about as well as you would expect.
Remove the flag.
Fixes: #30056
PR-URL: #30147
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@targostargos mentioned this pull request Apr 22, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.buildIssues and PRs related to build files or the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trap hidden in debug gyp settings

11 participants

@bnoordhuis@nodejs-github-bot@BridgeAR@addaleax@jasnell@Trott@cjihrig@devnexen@richardlau@mhdawson@Fishrock123