Skip to content

Conversation

@eeckstein
Copy link
Contributor

Fixes a crash when simplifying a load of an UnsafePointer-global which points to another global.

rdar://135223354

@eeckstein eeckstein requested a review from atrick September 13, 2024 14:36
@eeckstein
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should at least be an assert somewhere that there aren't any scoped instructions in the initializer

@eeckstein
Copy link
Contributor Author

We can add this to the verifier.

But in this case, the cloner is not copying from a global's init value but from the global initializer function.

@eeckstein
Copy link
Contributor Author

@swift-ci test windows

@atrick
Copy link
Contributor

atrick commented Sep 13, 2024

But in this case, the cloner is not copying from a global's init value but from the global initializer function.

I would put the assert in StaticInitCloner itself, which only handles init values, rather than assuming the check in this PR is complete. Presumably it's fine for the initializer function itself to have scoped instructions.

…tial value of a global

Fixes a crash when simplifying a load of an UnsafePointer-global which points to another global.

rdar://135223354
@eeckstein eeckstein force-pushed the fix-static-init-cloner branch from eeb1506 to 0ee51e4 Compare September 14, 2024 12:13
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

okay, I added an assert

@eeckstein eeckstein merged commit 85ecc95 into swiftlang:main Sep 17, 2024
@eeckstein eeckstein deleted the fix-static-init-cloner branch September 17, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants