opprop / checker-framework-inference

Inference of pluggable types for Java
6 stars 13 forks source link

OutOfMemory error raised when running Junit test #418

Open AndrewShf opened 1 year ago

AndrewShf commented 1 year ago

When running PICO-Infer's testsuite, some heap memory is not released, and after running a while, OOM error will be raised. Screen Shot 2023-04-06 at 5 51 19 PM

This is caused by circular reference and thus GC cannot free this memory. image Noticed that the aliases field indirectly referenced to the last picoinferencechecker instantiated (last testcase).

image Commenting out the addAliasedAnnotation use, solves the problem. Don't know why addAliasedAnnotation or addAliasedTypeAnnotation has this wrong behaviour. File an issue to keep track of this bug.