8000 RLC unsoundness at (pseudo?) assignments to `@MustCallUnknown` · Issue #6990 · typetools/checker-framework · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RLC unsoundness at (pseudo?) assignments to @MustCallUnknown #6990

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

Open
Calvin-L opened this issue Mar 19, 2025 · 1 comment · May be fixed by #6994
Open

RLC unsoundness at (pseudo?) assignments to @MustCallUnknown #6990

Calvin-L opened this issue Mar 19, 2025 · 1 comment · May be fixed by #6994

Comments

@Calvin-L
Copy link
Contributor

The RLC reports no violations on this code, although the resource parameter is clearly dropped without being closed:

import org.checkerframework.checker.mustcall.qual.MustCallUnknown;
import org.checkerframework.checker.mustcall.qual.Owning;

import java.io.Closeable;

public class DropOwning {

  public void f(@Owning Closeable resource) {
    drop(resource);
  }

  private void drop(@Owning @MustCallUnknown Object resource) {
  }

}

The manual suggests that this code should result in a required.method.not.known warning, although that doesn't seem to be the case.

@kelloggm
Copy link
Contributor

This is definitely an unsoundness bug. Thanks for the report, @Calvin-L.

The manual suggests that this code should result in a required.method.not.known warning, although that doesn't seem to be the case.

I agree that that's the right behavior here. An @Owning pointer with that type should always produce that warning, so I'm not sure what's going on here. I'll investigate.

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 a pull request may close this issue.

2 participants
0