Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't some competitions be detected? #26

Open
bupt01 opened this issue Jul 8, 2024 · 0 comments
Open

Why can't some competitions be detected? #26

bupt01 opened this issue Jul 8, 2024 · 0 comments

Comments

@bupt01
Copy link

bupt01 commented Jul 8, 2024

Below is a simple program that violates atomicity, but I'm curious why it hasn't been successfully fixed. Is there a problem with my configuration?

package test1;
public class D {
    int x = 0;
    void m1() {
        x++;
    }
    void m2() {
        x *= 2;
    }
    void test() throws Exception{
        final D d = new D();
        Thread d1 = new Thread() {
            public void run() {
                d.m1();
            }
        };
        Thread d2 = new Thread() {
            public void run() {
                d.m2();
            }
        };
        d1.start();
        d2.start();
        d1.join();
        d2.join();
        if(d.x < 1){
            throw new Exception();
        }
    }
    public static void main(String[] args) throws Exception {
        D d= new D();
        d.test();
    }
}

my cofigure is:
{
"infer": "infer",
"options": [ "--racerdfix-only", "--starvation" ],
"json_path": "./infer-out/",
"target_options": [ "--", "javac", "-cp", "/usr/local/hippodromeDockerFiles-main/annotation.jar", "D.java" ],
"prio_files": [],
"iterations": 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant