-
Notifications
You must be signed in to change notification settings - Fork 356
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
WPI: inconsistency between warning and inferred annotations #6417
Comments
@skehrli I attempted to reproduce the problem you're describing here and could not. It's possible, however, that it arises from a misreading of the output of the When I execute
This is the full log of the WPI run: that is, it is a log of all iterations of WPI on this target program. Each line that starts with "Running" and then a path to a Checker Framework javac is an iteration of WPI's outer loop; any warnings that appear in between them are the warnings that the checker produced during inference on that iteration. So, what we can deduce from this log is that on this program:
This behavior is consistent with what you've observed, except I'm not seeing a warning on the final iteration (only one during an earlier iteration). If this explains what you're seeing, great (we can close this issue). If you're seeing something different, please add more details here. |
One thing you could do is run the RLC on the final program with type annotations inferred via WPI; it should be the one with the highest numbered I think that could help debug the issue and answer Martin's question of whether the errors are only being issued on intermediate iterations. |
Thank you for your responses. The warning is only issued in the first iteration and no longer in later iterations, I misread the output, I'm sorry about that. I'll close the issue. |
Is there something we can improve in the output? Other people have made exactly this error before. |
Weird behavior of the WPI script: Running WPI with the ResourceLeakChecker on a directory gives a warning. When the ResourceLeakChecker is run on the annotated file provided by WPI, there is no warning.
Reproduce:
wpiTest.zip
Unzip the provided zip file and run WPI with the resourceLeakChecker. Observe the warning about a not-called method.
unzip wpiTest.zip && cd RLCtest
/path/to/wpi.sh -- --checker org.checkerframework.checker.resourceleak.ResourceLeakChecker
The output of WPI will contain information about the annotated file, which was in /temp/wpi-ajava-/iteration1/RLCcheckerTest-org.checkerframework.checker.resourceleak.ResourceLeakChecker.ajava for me.
Change the file type from ajava to java. Now, run the ResourceLeakChecker on the file.
javacheck -processor resourceleak /path/to/annotated/file.java
Assuming javacheck is correctly set as an alias to the javac version of the checker framework, this runs the resourceleak checker on the file. There is no warning now, since all inferred annotations in the file are correct. It seems somehow WPI misses some annotation information.
The text was updated successfully, but these errors were encountered: