[Soot-list] an exception when constructing PDG

Xueliang Li xueliang at ruc.dk
Thu May 22 08:58:09 EDT 2014


Hi,

I embedded the Soot's PDG(Program Dependence Graph) in my slicing analysis, and ran on a simple example, as follows:


public class mainone {


public static void main(String[] a) {

    int x=5;

    int y = x+6;

    String foo = null;

    foo = new String("Hello");



    if(x > 5){

            if(y>6)

            {

                System.out.print(foo);

            }else{

                System.out.print(x);

            }



    }else{

      System.out.println(y);

    }

        y = x + y;

  }

}

However, I got an “IllegalAccessError”:


Exception in thread "main" java.lang.IllegalAccessError: tried to access field soot.toolkits.graph.BlockGraph.mBody from class soot.toolkits.graph.pdg.EnhancedBlockGraph

at soot.toolkits.graph.pdg.EnhancedBlockGraph.<init>(EnhancedBlockGraph.java:36)

at soot.toolkits.graph.pdg.RegionAnalysis.findWeakRegions(RegionAnalysis.java:106)

at soot.toolkits.graph.pdg.RegionAnalysis.<init>(RegionAnalysis.java:88)

at soot.toolkits.graph.pdg.HashMutablePDG.<init>(HashMutablePDG.java:103)

at sootapdg.PDG.MDG.<init>(MDG.java:62)

at sootapdg.PDG.PDG.build_SDG(PDG.java:128)

at sootapdg.PDG.PDG.<init>(PDG.java:66)

at sootapdg.SAMain.run(SAMain.java:111)

at sootapdg.SAMain.main(SAMain.java:56)


I searched online, the problem seems to be modifying and recompiling one java file(soot.toolkits.graph.BlockGraph) without recompiling all the java files at one shot.
Does anyone have some advices on how to solve this?

Thanks in advance!

Cheers,
Xueliang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140522/62f3706e/attachment.html 


More information about the Soot-list mailing list