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

VNA00J doesn't compute unprotected accesses of methods correctly #34

Open
reprogrammer opened this issue Apr 8, 2011 · 2 comments
Open
Labels
Milestone

Comments

@reprogrammer
Copy link
Owner

The detector of VNA00J fails to report the bug instance in the following piece of code.

public class A {

    Object o = new Object();

    @EntryPoint
    public static void main(String args[]) {
        new A().m1();
    }

    void m1() {
        /* [VNA00J,01 */synchronized (new Object()) {
            m2();
        }/* ] */
    }

    void m2() {
        o = new A();
    }
}
@reprogrammer
Copy link
Owner Author

The root cause of this problem is the same as that of issue #31.

@Wanderer777
Copy link
Collaborator

In VNA00J, we add the initial sets to the result of the propagation in edu.illinois.keshmesh.detector.VNA00JBugDetector.getInstructionsToReport(BitVectorSolver<CGNode>, CGNode).

    //Add the initial set of the given CGNode.
    CGNodeInfo cgNodeInfo = cgNodeInfoMap.get(cgNode);
    cgNodeInfo.getBitVectorContents(unprotectedInstructionsThatMayAccessUnsafelySharedFields, globalValues);

Therefore, VNA00J does not suffer from the same problem that LCK06J did (See issue #31). But, it would be nice to refactor VNA00J to propagate the information along the nodes as LCK06J does.

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

No branches or pull requests

2 participants