Skip to content

[5.4][sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code. #37487

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
May 20, 2021

Conversation

gottesmm
Copy link
Contributor

[sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code.

These asserts validate some behavior of the compiler around which
SILInstruction can be paired with what type of SILLocation. That being said,
these asserts only effect debug info and are tripping in some programs on Linux
where we ship the compiler with assertions enabled. Darwin does not have these
issues since the compiler is shipped /without/ compiler assertions enabled.

rdar://77325585


Explanation: Avoid a harmless debug-info assertion that some people are seeing on Linux (when compiled with optimization) where we ship the compiler with assertions enabled.
Scope: The change turns off an assertion that validates that certain structural debug info properties are maintained. The problem itself being found results in just a small code local degradation in debug info quality. The assert in the mean time stops the user from being able to compile their code with optimizations enabled on Linux. So to balance that out, given where we are with the 5.4 release, it makes sense to just turn this off for now. The issue here does not happen on master and I am adding a new form of this assert that should make it much easier to track these down here: #37468.
Risk: Low
Testing: None. Commented out the debug info assert that was firing.
Issue: rdar://77325585
Reviewer: Adrian Prantl

…e crashes in user code.

These asserts validate some behavior of the compiler around which
SILInstruction can be paired with what type of SILLocation. That being said,
these asserts only effect debug info and are tripping in some programs on Linux
where we ship the compiler with assertions enabled. Darwin does not have these
issues since the compiler is shipped /without/ compiler assertions enabled.

rdar://77325585
@gottesmm gottesmm requested a review from adrian-prantl May 18, 2021 18:33
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm changed the title [sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code. [5.4][sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code. May 18, 2021
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c923ea4

@gottesmm
Copy link
Contributor Author

@swift-ci test linux platform

@gottesmm
Copy link
Contributor Author

Got approval to merge. Going to do a subsequent PR that deletes the code.

@gottesmm gottesmm merged commit 17deae8 into swiftlang:release/5.4 May 20, 2021
@gottesmm gottesmm deleted the release/5.4-77325585 branch May 20, 2021 00:05
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