[Soot-list] an exception when constructing PDG

Dacong Yan tonywinslow1986 at gmail.com
Thu May 22 09:49:41 EDT 2014


>> the problem seems to be modifying and recompiling one java file

What changes have you made and how do you recompile just one file? You
would see the exception if you change the mBody field from protected
to private.

On Thu, May 22, 2014 at 8:58 AM, Xueliang Li <xueliang at ruc.dk> wrote:
> 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
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>



-- 
Dacong (Tony) Yan
Ph.D. Student
Computer Science and Engineering
The Ohio State University, Columbus
http://www.cse.ohio-state.edu/~yan


More information about the Soot-list mailing list