Skip to content

SIL Parser: Use a Set instead of a Vector for zombie functions to avoid duplicates #6478

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
Dec 22, 2016

Conversation

shajrawi
Copy link

We had duplicate function definitions in SIL, those got inserted more than once into the potentially zombie functions vector, causing a crash / duplicate work on them. This caused a bug in SIL/Parser/array_roundtrip.swift

This PR changes the data structure to a Set to avoid duplications

Fixes
rdar://problem/29780448
rdar://problem/29767444

@shajrawi
Copy link
Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor

Do we iterate over this? If so, it might be better to use a SetVector, to be sure it's deterministic.

@shajrawi
Copy link
Author

@jrose-apple We only iterate over it during destruction, to set all functions as zombies basically, we do not need need determinism

@shajrawi
Copy link
Author

Swift CI is down unfortunately, can't merge into master even though this is quite the blocker for our builds / tests :(

@swiftix
Copy link
Contributor

swiftix commented Dec 22, 2016

Linux failure is unrelated. Merging.

@swiftix
Copy link
Contributor

swiftix commented Dec 22, 2016

I meant OS X failure is unrelated.

@swiftix swiftix merged commit 474096b into master Dec 22, 2016
@shajrawi shajrawi deleted the fix_array_roundtrip branch December 22, 2016 23:14
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.

3 participants