Repository navigation
gcc-11 builds with --enable-lto cause test segfaults + runtime errors #38501
Description
Activity
Here is the output of the test suite.
@mkszuba Any chance you can use a native debugger to get a backtrace here, or provide binary + coredump?
Sure, here you go.
node-14.16.1-cctest_backtrace.log- added a commit that references this issue
on May 18, 2021 - addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on Aug 9, 2021 Ping this issue still exist and with GCC 11 being used more and more, also more and more people are affected by the lack of possible optimisations.
Is there a chance that someone with more experience can take a look into what is the cause of the problems when building with LTO enabled?
I have confirmed that there are NO ERRORs in gcc-11 + --enable-lto.
Sorry, I have no idea that my test is equivalent tocctestor not.
I have tested as follows.src: master branch + cherry-pick c6e4596 (#41772)
Platform: Ubuntu 20.04
cpu: Ryzen Threadripper
gcc -v: gcc 11.1.0
test asrootwith following commandexport CFLAGS="-march=native" export CXXFLAGS="-march=native" export CPPFLAGS="-march=native" ./configure --experimental-enable-pointer-compression --enable-lto make -j60 make -j60 test
github-actions commented
on Jun 27, 2026 on Jun 27, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Jun 27, 2026 github-actions commented
on Jul 28, 2026 on Jul 28, 2026 – with GitHub ActionsContributorMore actionsThis issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
What steps will reproduce the bug?
3a. To reproduce test segfault, run cctest
3b. To reproduce runtime errors, use this build of node to e.g. compile a recent version of Firefox
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
Node passes tests and runs correctly.
What do you see instead?
See e.g. https://bugs.gentoo.org/787158
Additional information
Enabling LTO for the same node versions works fine with gcc-10.