typetools / typetools/checker-framework

Resource Leak Checker consuming excessive memory for compilation unit

Open
#6,435 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.