typetools / typetools/checker-framework
Resource Leak Checker consuming excessive memory for compilation unit
@msridhar is already working on this.
Since Feb 4, 2024.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Test case:
hive_parse_test.zip
To reproduce, unzip, and modify compile.sh so that CF_ROOT points to your local Checker Framework repo. Then run ./compile.sh. The checker exhausts 16GB of RAM analyzing HiveParser.java. It's a large (~30k lines) source file generated by ANTLR I think. But still, 16GB of heap for one file is a lot. Even just running the Tainting Checker on this class needs about 8GB of heap. The RLC is hurt by needing to run the MustCallChecker as a sub checker and keep its state in memory. Doing some memory profiling, it seems a significant amount of memory is consumed by the caching of flow analysis results in the org.checkerframework.framework.type.GenericAnnotatedTypeFactory#flowResult field.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.