Skip to content

Conversation

kelloggm
Copy link
Contributor

fixes #6990

@kelloggm kelloggm requested a review from mernst March 20, 2025 16:24
mernst
mernst previously approved these changes Mar 20, 2025
Copy link
Member

@mernst mernst left a comment

Choose a reason for hiding this comment

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

Thanks!

@mernst mernst enabled auto-merge (squash) March 20, 2025 16:29
@kelloggm
Copy link
Contributor Author

@mernst I think you should review this again to make sure that the new @MustCall annotations in the Initialization checker are ok.

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.

@mernst
Copy link
Member

mernst commented Mar 25, 2025

@kelloggm CI is not passing. Could you fix that? Then I will review.

@mernst
Copy link
Member

mernst commented Jul 18, 2025

@kelloggm Ping.

@mernst mernst requested a review from Copilot July 18, 2025 14:35
Copy link

@Copilot Copilot AI left a 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

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.

RLC unsoundness at (pseudo?) assignments to @MustCallUnknown
2 participants