-
Notifications
You must be signed in to change notification settings - Fork 378
Fix RLC unsoundness with explicit @MustCallUnknown
annotation
#6994
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
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks!
@mernst I think you should review this again to make sure that the new Also, this change could introduce user-facing behavior in the form of new warnings (as shown by the need to add those annotations). Does that warrant a changelog entry? If so, I don't mind adding one. |
@kelloggm CI is not passing. Could you fix that? Then I will review. |
@kelloggm Ping. |
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.
Pull Request Overview
This pull request fixes an RLC (Resource Leak Checker) unsoundness issue by adding explicit @MustCallUnknown
annotations to prevent incorrect behavior when handling owning parameters with unknown must-call obligations.
- Adds proper error detection for
@Owning
parameters with@MustCallUnknown
annotations - Improves must-call type resolution by using hierarchy-aware annotation lookup
- Adds type annotations to initialization classes to ensure proper type checking
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
DropOwning.java | New test case demonstrating the fix for issue #6990 with expected error |
CrashForTempVar.java | Adds suppression annotation to focus testing on crash detection |
MustCallConsistencyAnalyzer.java | Updates annotation lookup logic and fixes typo in comment |
InitializationTransfer.java | Adds @MustCall type annotations to class declaration |
InitializationStore.java | Adds @MustCall type annotations and improves class documentation |
checker/src/main/java/org/checkerframework/checker/initialization/InitializationStore.java
Outdated
Show resolved
Hide resolved
…ion/InitializationStore.java Co-authored-by: Copilot <[email protected]>
fixes #6990