Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with -O3 and -flto with GCC 8.3.0 and newer #27054

Closed
marxin opened this issue Apr 2, 2019 · 5 comments
Closed

Segmentation fault with -O3 and -flto with GCC 8.3.0 and newer #27054

marxin opened this issue Apr 2, 2019 · 5 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@marxin
Copy link

marxin commented Apr 2, 2019

As analyzed in GCC bug report, I suspect nodejs violates aliasing rules:
https://github.com/nodejs/node/blob/master/src/node_platform.cc#L397

@bnoordhuis bnoordhuis added the build Issues and PRs related to build files or the CI. label Apr 2, 2019
@bnoordhuis
Copy link
Member

Thanks for the report. Node.js is normally built with -fno-strict-aliasing for this reason, see the list of compiler flags in common.gypi.

It seems the reporter of the GCC bug explicitly overrode that but that's not a supported configuration so I'll go ahead and close this out.

@marxin
Copy link
Author

marxin commented Apr 2, 2019

Thanks for the report. Node.js is normally built with -fno-strict-aliasing for this reason, see the list of compiler flags in common.gypi.

Heh, knowing that, it would save some time for me :)
Btw. are you considering removal of the -fno-strict-aliasing? Note that you're paying by performance..

@bnoordhuis
Copy link
Member

V8, the Javascript engine, relies heavily on techniques that are not strict-aliasing safe. Fixing that has been discussed since at least 2010 and it's 2019 now so I don't think it'll happen anytime soon. :-)

@emerzon
Copy link

emerzon commented Jun 25, 2019

I have the exact same issue just by enabling lto (--enable-lto). I am not messing around with -fno-strict-aliasing.

@addaleax
Copy link
Member

@emerzon Since you are not changing compiler flags, it’s likely a different underlying problem – can you open a new bug report, fill out the details (esp. system information + maybe compile version), and the steps that you used to reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

4 participants