-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
build: Windows SSP roundup #28461
build: Windows SSP roundup #28461
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Nice!
Where is this quote from? |
The Mingw-w64 release notes: https://sourceforge.net/p/mingw-w64/mailman/message/37837156/. |
b12c66e
to
1121f26
Compare
1121f26
to
f7f8522
Compare
Concept ACK I'm confused like @fanquake though. I would have expected us to need to carry the hack for a while, considering that the fix is from this year. |
Guix builds (x86_64)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach ACK on stack smashing protection stuff.
contrib/guix/manifest.scm
Outdated
;; and thus will ensure that this works properly. | ||
`(cons "gcc_cv_libc_provides_ssp=yes" ,flags)))))) | ||
"--enable-default-ssp=yes", | ||
"--enable-default-pie=yes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this affect binaries? Aren't position independent executables an ELF thing, not PE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure I did this so we could consolidate the gcc hardening options, doesn't need to be a blocker for this, so dropped for now.
f7f8522
to
f95af98
Compare
My Guix builds:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f95af98, I've verified binaries from bitcoin-f95af98128f1-win64.zip
on Windows 11 Pro 23H2.
However, the penultimate commit works just fine as well. The diffoscope
shows minor changes in binaries.
So do we actually need the last commit at all?
The point is to explicitly enable the hardening option. This is the same as we do for the Linux GCC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting this to fail to compile somewhere, maybe in the CI, but that doesn't seem to be the case?
Seems workable given the SSP related changes in the newer mingw-w64 headers (which are in Guix):
However I think this would still be broken in some older environments, so we might have to wait for a compiler bump, or similar. The optional -lssp also seems to work when using older headers, which doesn't make sense.
Would fix #28104.