Hi, I found a false negative in Infer 1.3.0 when a RandomAccessFile is allocated and never closed or returned.
Affected checker
Infer PULSE_RESOURCE_LEAK
Minimal reproducer
import java.io.IOException;
import java.io.RandomAccessFile;
class InferLeakRandomAccessFile {
void test() throws IOException {
new RandomAccessFile("file.txt", "r");
}
}
Reproduction command
infer --version
infer run --pulse --enable-issue-type PULSE_RESOURCE_LEAK -- javac infer-resourceleak-fn-randomaccessfile-model.java
Current behavior
Infer completes successfully but produces no PULSE_RESOURCE_LEAK finding.
Expected behavior
Infer should report PULSE_RESOURCE_LEAK at line 6 because the allocated RandomAccessFile is never closed or returned.
Hi, I found a false negative in Infer 1.3.0 when a RandomAccessFile is allocated and never closed or returned.
Affected checker
Infer PULSE_RESOURCE_LEAKMinimal reproducer
Reproduction command
Current behavior
Infer completes successfully but produces no
PULSE_RESOURCE_LEAKfinding.Expected behavior
Infer should report
PULSE_RESOURCE_LEAKat line 6 because the allocated RandomAccessFile is never closed or returned.