[5.4][sil][debug-info] Turn off a few asserts just on 5.4 to eliminate some crashes in user code. #37487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[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