-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ownership] On non-Darwin platforms, serialize the stdlib in OSSA form. #36025
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
[ownership] On non-Darwin platforms, serialize the stdlib in OSSA form. #36025
Conversation
… SIL entities and use it to properly invalidate global variables/witness tables when we delete them. Otherwise, one runs into memory corruption. I ran into this while enabling ossa on the stdlib for non-Darwin platforms. Hopefully we do not regress on this again when someone adds more optzns that eliminate these since I added a big NOTE to warn people to do it and implemented support even for the entities we do not support deleting at the SIL level... yet.
@swift-ci test |
@swift-ci test windows platform |
Build failed |
Build failed |
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.
Very nice! So out of curiosity, is there a potential issue with asking to deserialize entities that were already deleted, separate from memory corruption? We don't want to repeatedly deserialize.
a93b091
to
0abe458
Compare
@swift-ci test |
@atrick I didn't look into that. In the deserialization case it is when we early on deserialize _swiftEmptyArrayStorage, then DCE it, then down the line after maybe additional inlining/etc it becomes exposed after deserializing a different function. |
Build failed |
…SSA as well. I had to fix a memory corruption bug (see previous commit) to land this. But now that it is fixed, we are ready!
0abe458
to
57654da
Compare
@swift-ci test |
This PR has two commits in it: