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

A self loop edge bug #2063

Open
karlls12321 opened this issue Mar 30, 2024 · 0 comments
Open

A self loop edge bug #2063

karlls12321 opened this issue Mar 30, 2024 · 0 comments

Comments

@karlls12321
Copy link

Hi, I used Soot CHA to generate the call graph and found a bug about incorrect loop edges. See the minimized code example below:

public class Main {
    public void foo(){
        String str = this.toString();
    }
    @Override
    public String toString(){
        return "1";
    }
}

When I set the 'Main.toString()' as the entry method, there is a call edge from Main.toString() to Main.toString(), which is incorrect.

Options

Options.v().set_whole_program(true);
Options.v().set_soot_classpath("Path/to/jdk"); 
Options.v().set_no_bodies_for_excluded(true);
Options.v().set_process_dir("Path/to/dir");
Options.v().process_dir();
Options.v().set_allow_phantom_refs(true);
Options.v().setPhaseOption("jb", "use-original-names:true");
Options.v().set_prepend_classpath(false);
Options.v().set_exclude(Constants.excludedClassList);
Scene.v().loadNecessaryClasses();
CHATransformer.v().transform();
PackManager.v().runPacks();
CallGraph cg = Scene.v().getCallGraph();

Version: Soot 4.4.1

@karlls12321 karlls12321 changed the title A loop edge bug A self loop edge bug Apr 7, 2024
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