-
Notifications
You must be signed in to change notification settings - Fork 143
Fix crash caused by repeatedly cloning the same path hierarchy node #1220
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Fix crash caused by repeatedly cloning the same path hierarchy node #1220
Conversation
rdar://150706871
@swift-ci please test |
@swift-ci please test |
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.
Overall looks good. I tried locally however I could never reproduce crash consistently but I can say with the change there is no crash.
@swift-ci please test |
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.
Nice one!
@d-ronnqvist Thank you for taking time to answer pr comments. |
Bug/issue #, if applicable: rdar://150706871&148247074
Summary
This primarily fixes a crash caused by repeatedly cloning the same path hierarchy node. (e161b2a)
Then if fixes additional crashes that were made more common due to cloned nodes (4187f62 and c12c7d1)
Seeing these changes in aggregate I would like to take some time to reorganize the path hierarchy initializer to better distinguish the expected code paths from the code paths that try to gracefully handle incomplete symbol graph files. However, I would want to cherry-pick these crash fixes into the 6.2 release and I'm not yet sure about the scope of the other code cleanup so I'd prefer to open a separate PR for that.
Dependencies
None.
Testing
Because most of these issues are related to unexpectedly incomplete symbol graph files it's fairly difficult to test this all the way from symbol graph generation. I could manually craft a symbol graph file that is based on one of the added unit tests, but I don't find that that would provide any more assurances than running the tests which the CI already does.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded