[Soot-list] queries on threads

Patrick LAM plam at sable.mcgill.ca
Mon Apr 3 15:26:56 EDT 2006


On Tue, 4 Apr 2006, Arnab De wrote:

>         staticinvoke <java.lang.Thread: void yield()>();
>         $r7 = this.<Friendly: Friendly partner>;
>         specialinvoke $r7.<Friendly: void hugBack()>();
>         return;
>     }
>
> Please observe that there is a "specialinvoke" in the last but one line
> (just before the return statement). As far as I understand, specialinvokes
> are for constructors. Can anyone please tell me why specialinvoke has come
> here?

That is kind of odd.  However, I compiled your Java code and then looked
at it using javap.  It also contains a specialinvoke:

   64:  aload_0
   65:  getfield        #11; //Field partner:LFriendly;
   68:  invokespecial   #16; //Method hugBack:()V
   71:  return

Usually, specialinvoke is used for constructors, but there are certain
other cases where it can occur.  I'm not especially familiar with them.
In any case, Soot is just processing what it gets.

pat




More information about the Soot-list mailing list