Skip to content

fix a bug in the ReleaseDevirtualizer pass #42026

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

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

eeckstein
Copy link
Contributor

The release-devirtualizer must not run on the same alloc_ref twice.
This is a very rare case, but if it happens it's a very bad thing, because it results in a double-free crash.

The fix is to detect that a dealloc_ref instruction (although it isn't "releasing"), does a memory deallocation.

Found by doing some unrelated experiments.

The release-devirtualizer must not run on the same alloc_ref twice.
This is a very rare case, but if it happens it's a very bad thing, because it results in a double-free crash.

The fix is to detect that a dealloc_ref instruction (although it isn't "releasing"), does a memory deallocation.

Found by doing some unrelated experiments.
@eeckstein eeckstein force-pushed the fix-release-devirtualizer branch from 10fd339 to 7eef54f Compare March 25, 2022 13:30
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

1 similar comment
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test macos

@eeckstein eeckstein merged commit 2021a73 into swiftlang:main Mar 27, 2022
@eeckstein eeckstein deleted the fix-release-devirtualizer branch March 27, 2022 18:42
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.

1 participant