Skip to content

SIL: Gate checkForLeaksAfterDestruction to asserts builds #36502

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

Conversation

kastiglione
Copy link
Contributor

A few lldb bug reports have shown that SILModule::checkForLeaksAfterDestruction() can fail. The root cause is TBD, possibly by calling IRGenRequest::evaluate concurrently (the leaks check uses counters that are not thread safe).

This leaks check should reasonably be performed only in asserts builds. That way end users won't face a crash if there's a race in how the check is performed, or if there is a leak. Note that SILModule::checkForLeaks() is called only in asserts builds.

rdar://70826934

(cherry picked from #35568)

@kastiglione kastiglione requested a review from a team as a code owner March 18, 2021 20:00
@kastiglione
Copy link
Contributor Author

@swift-ci test

@kastiglione kastiglione requested a review from fredriss March 25, 2021 18:58
@kastiglione kastiglione merged commit 66e146e into release/5.4 Mar 25, 2021
@kastiglione kastiglione deleted the SIL-Gate-checkForLeaksAfterDestruction-to-asserts-builds branch March 25, 2021 19:00
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