[Soot-list] an exception when constructing PDG

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Fri May 23 09:23:20 EDT 2014


As a general thing, we've been tightening the access modifiers and
changing a few other things (mostly adding generics and a few changes to
data structures). Maybe its best to just compile
sootapdg with a nightly build?

Regards,

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 05/22/2014 09:49 AM, Dacong Yan wrote:
>>> 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
>>
> 
> 
> 


More information about the Soot-list mailing list