facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.97k stars 2.02k forks source link

a false negative about startvation #1626

Open ghost opened 2 years ago

ghost commented 2 years ago

Infer version: v1.1.0 OS version: Ubuntu 20.04

Command:

infer run --starvation -- javac -cp /path/to/android-support-v4.jar Test.java

Output:

Capturing in javac mode...
Found 1 source file to analyze in /path/to/infer-out
1/1 [################################################################################] 100% 24.568ms

No issues found  

Code Example:

Object lock;
Object o = new Object() {
    @UiThread
    void Bad() {
        synchronized (lock) {
        }
    }
};