[Soot-list] Some variable names retained, and some not

Dhriti Khanna dhritik at iiitd.ac.in
Thu Oct 3 16:11:56 EDT 2019


By the way, it is working fine with JDK-1.7 and soot-2.5.0.
It is when I use JDK-1.8 and soot-3.3.0, then it causes the above-mentioned
issue.
Is it a bug or some optimization being done?

On Thu, Oct 3, 2019 at 2:08 PM Dhriti Khanna <dhritik at iiitd.ac.in> wrote:

> I have also tried compiling the file with -g on command line and then
> running soot via command line with this command:
>
> java -cp ~/soot-3.3.0/target/sootclasses-trunk-jar-with-dependencies.jar
> soot.Main -src-prec java -p jb use-original-names:true -f J -cp
> .:/home/dhriti/jdk1.8.0_191/jre/lib/rt.jar Sample
>
> Still, the problem persists.
>
> On Thu, Oct 3, 2019 at 1:39 PM Dhriti Khanna <dhritik at iiitd.ac.in> wrote:
>
>> Yes, I have this option enabled. Also, I have checked the box to 'Add
>> variable attributes to generated class files (used by the debugger)' in
>> eclipse. This is identical to the -g option with javac so as to have the
>> debugging information enabled.
>>
>> On Tue, Oct 1, 2019 at 5:46 PM Eric Bodden <eric.bodden at uni-paderborn.de>
>> wrote:
>>
>>> Hi Dhriti.
>>>
>>> This looks a bit odd. Just to make sure. Do you have the option "-p jb
>>> use-original-names:true” enabled?
>>>
>>> Cheers
>>> Eric
>>>
>>> > On 30. Sep 2019, at 14:23, Dhriti Khanna <dhritik at iiitd.ac.in> wrote:
>>> >
>>> > Hello,
>>> > When I generate jimple file for the following code:
>>> >
>>> > class Point {
>>> >   int p;
>>> > }
>>> >
>>> > class Example {
>>> >   int a;
>>> >   String b;
>>> >   Point point;
>>> >   Example() {
>>> >
>>> >   }
>>> >   Example(int a) {
>>> >   this.a = a;
>>> >   }
>>> > }
>>> >
>>> > class Sample {
>>> >   LinkedList<Example> allocationQueue;
>>> >   Sample() {
>>> >     allocationQueue = new LinkedList<Example>();
>>> >   }
>>> >   public void func(int a) throws InterruptedException {
>>> >     int x;
>>> >     x = a+10;
>>> >     allocationQueue = new LinkedList<Example>();
>>> >     Example example = new Example();
>>> >     example.point = new Point();
>>> >     Point p = example.point;
>>> >     System.out.println(example);
>>> >   }
>>> > }
>>> >
>>> > Why is it that some variable names are retained like Point 'p', and
>>> some not? In this case, 'example' is not retained. It is instead replaced
>>> with $stack6 as you can see in the jimple file attached.
>>> >
>>> > --
>>> > Regards
>>> > Dhriti Khanna
>>> > PhD Scholar
>>> > IIIT Delhi
>>> > <Sample.jimple>_______________________________________________
>>> > Soot-list mailing list
>>> > Soot-list at CS.McGill.CA
>>> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>>>
>>>
>>
>> --
>> Regards
>> Dhriti Khanna
>> PhD Scholar
>> IIIT Delhi
>>
>
>
> --
> Regards
> Dhriti Khanna
> PhD Scholar
> IIIT Delhi
>


-- 
Regards
Dhriti Khanna
PhD Scholar
IIIT Delhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20191004/24055265/attachment.html>


More information about the Soot-list mailing list