Skip to content
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

Fix inconsistency between exct and nothrow effect #52853

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Fix inconsistency between exct and nothrow effect #52853

merged 1 commit into from
Jan 12, 2024

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 10, 2024

Fixes #52846. Different unreachability checks use different definitions for this and were inconsistenct, causing the assertion.

Since the exct modeling isn't fully plubmed through all corners of the compiler yet, also change the caller code to force the nothrow effect to be authoritative for the time being.

@oscardssmith oscardssmith added bugfix This change fixes an existing bug compiler:effects effect analysis labels Jan 10, 2024
@oscardssmith oscardssmith requested a review from aviatesk January 11, 2024 04:24
base/compiler/abstractinterpretation.jl Outdated Show resolved Hide resolved
Comment on lines +3298 to +3302
if exct !== Union{}
update_exc_bestguess!(interp, exct, frame)
# TODO: assert that these conditions match. For now, we assume the `nothrow` flag
# to be correct, but allow the exct to be an over-approximation.
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, I think the exct modeling should encompass the nothrow modeling. But I agree with you that this approach might be the best for now. We'd seize opportunities to enhance exct modeling as they arise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should eventually delete the nothrow effect in favor of this, but I don't think there's any urgency.

Fixes #52846. Different unreachability checks use different definitions for
this and were inconsistenct, causing the assertion.

Since the exct modeling isn't fully plubmed through all corners of the
compiler yet, also change the caller code to force the nothrow effect
to be authoritative for the time being.
@Keno Keno merged commit 0fdd55b into master Jan 12, 2024
4 of 7 checks passed
@Keno Keno deleted the kf/52846 branch January 12, 2024 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:effects effect analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IR verification error caused by exct modeling changes
3 participants