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
}
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?
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
}