-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Change the generated code model to Large on Windows 64 bit #7489
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
Conversation
@swift-ci please smoke test |
lib/IRGen/IRGen.cpp
Outdated
// On Windows 64 bit, dlls are loaded above the max address for 32 bits. | ||
// This means that a default CodeModel causes generate code to segfault | ||
// when run. | ||
if (Triple.isArch64Bit() && Triple.isOSWindows()) |
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.
Should Cygwin-32 continue using the large model too?
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.
It's unclear, I'm taking this from a comment in that Pr:
Cygwin should use large memory model as default.(This may be changed
if someone ports to 32bit)
I think for now specialising this to 64 bit, which is the only one that's been tested, is the right way to go.
Logically speaking, I'm not sure how referencing a 32 bit address on a 32 bit architecture would be bad, but I can't test this
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.
@tinysun212, any insights to offer?
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.
@compnerd if no insights are to be offered
@swift-ci please smoke test |
It seems that nobody ports to 32bit Cygwin. |
LGTM |
See discussion in #3841
Before this, generated code referenced 32 bit addresses, causing segfaults when running it on Windows 64 bit.