FALSE NEGATIVE: PULSE_RESOURCE_LEAK misses unclosed ZipFile-family resources
- Dominant language
- OCaml
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 19h 36m
- Merged PRs (30d)
- 13
Description
Hi, I found a false negative in Infer 1.3.0 when a ZipFile resource is allocated and never closed or returned.
**Affected checker**
`Infer PULSE_RESOURCE_LEAK`
**Minimal reproducer**
```java
import java.io.IOException;
import java.util.zip.ZipFile;
class InferLeakZipFile {
void test() throws IOException {
new ZipFile("archive.zip");
}
}
```
**Reproduction command**
```bash
infer --version
infer run --pulse --enable-issue-type PULSE_RESOURCE_LEAK -- javac infer-resourceleak-fn-zipfile-family.java
```
**Current behavior**
Infer completes successfully but produces no `PULSE_RESOURCE_LEAK` finding. Replacing `ZipFile` with its subclass `JarFile` produces the same result.
**Expected behavior**
Infer should report `PULSE_RESOURCE_LEAK` at line 6 because the allocated ZipFile is never closed or returned.
Contributor guide
Assessment
This issue has not been assessed yet.