[Soot-list] Incorrect entry in TamiFlex log file

Christophe Foket christophe.foket at elis.ugent.be
Wed Apr 6 11:29:33 EDT 2011


Hi Eric,

Thanks for your help. Everything is working as expected now.

Christophe

On 04/05/2011 03:15 PM, Eric Bodden wrote:
> Hi Christophe.
>
> This was indeed due to the filtering of stack traces, as I already
> anticipated. I have committed a patch to our Mercurial repository.
> Thanks for pointing out this problem to us!
>
> Eric
>
> On 2 April 2011 18:37,<Christophe.Foket at elis.ugent.be>  wrote:
>> Hello,
>>
>> I've been trying to use TamiFlex' poa.jar to generate a reflection log
>> file for the following application:
>>
>> A.java:
>>
>>      public enum A {
>>
>>          HELLO,
>>          GOODBYE
>>      }
>>
>> Main.java:
>>
>>      import java.util.EnumSet;
>>
>>      public class Main {
>>
>>          public static void main(String[] args){
>>
>>                  System.out.println(EnumSet.noneOf(A.class));
>>          }
>>      }
>>
>> I used the following command:
>>
>> -bash-3.2$ java
>> -javaagent:../../../libraries/tamixflex/poa-1.1.1.jar=out/ Main
>> []
>>
>> =============================================
>> TamiFlex Play-Out Agent Version 1.1.1
>> Found 1 new log entries.
>> Log file written to:
>> /home/cfoket/private/workspaces/workspace/SootTest/test/enum/src/out/refl.log
>>
>> The refl.log file then contains a single entry:
>>
>> Method.invoke;<A: A[]
>> values()>;java.lang.System$2.getEnumConstantsShared;1140;
>>
>> However, closer inspection of the class System$2 reveals that there is
>> no Method.invoke instruction at address 1140. In fact, javap tells me
>> that getEnumConstantsShared only contains the following code:
>>
>> public java.lang.Enum[] getEnumConstantsShared(java.lang.Class);
>>    Code:
>>     0:   aload_1
>>     1:   invokevirtual   #53; //Method
>> java/lang/Class.getEnumConstantsShared:()[Ljava/lang/Object;
>>     4:   checkcast       #25; //class "[Ljava/lang/Enum;"
>>     7:   areturn
>>
>> Following the call to Class.getEnumConstantsShared leads me to the
>> Method.invoke, call, which is at address 47
>>
>> 47:  invokevirtual   #899; //Method
>> java/lang/reflect/Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
>>
>> This means that the entry in the reflection log file should have been
>> Method.invoke;<A: A[]
>> values()>;java.lang.Class.getEnumConstantsShared;47; instead.
>>
>> Any ideas on why TamiFlex generates the wrong output?
>>
>> Kind regards,
>>
>> Christophe
>>
>> PS: I'm using java version 1.6.0_24.
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>



More information about the Soot-list mailing list