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

An inconsistent behavior in Soot analysis #2067

Open
tisble opened this issue Apr 13, 2024 · 0 comments
Open

An inconsistent behavior in Soot analysis #2067

tisble opened this issue Apr 13, 2024 · 0 comments

Comments

@tisble
Copy link

tisble commented Apr 13, 2024

Describe the bug
Hi, I found a code example which can help improving Soot. See the minimized code example below.

The inconsistency is the call graph edge from A.foo() to B.foo(). When the method A.bar() is commented out, this edge is not reported, however, when this method is uncommented, this edge will appear in the results.

Actually, the method A.bar() definitely should not affect this call edge. So, I think this is an inconsistency bug.
Input file

public class A extends B {
    protected String bar() {
        return "";
    }
    @Override
    public boolean foo() {
        return super.foo();
    }
}
abstract class B {
    public boolean foo() {
        return true;
    }
}

To reproduce
I use the following code to setup and generate the call graph via RTA algorithm:

Transform transform = new Transform("cg.spark", null);
PhaseOptions.v().setPhaseOption("cg.spark", "on");
PhaseOptions.v().setPhaseOption("cg.spark", "rta:true");
PhaseOptions.v().setPhaseOption("cg.spark", "types-for-sites:true");
PhaseOptions.v().setPhaseOption("cg.spark", "on-fly-cg:false");
Map<String, String> phaseOptions = PhaseOptions.v().getPhaseOptions(transform);
SparkTransformer.v().transform(transform.getPhaseName(), phaseOptions);
PackManager.v().runPacks();

My Soot version is 4.5.0.

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