[Soot-list] How check for array argument?
Rohan Padhye
rohanpadhye at cse.iitb.ac.in
Sat May 25 01:18:05 EDT 2013
Hello John,
1. You can look at the "type" of the "Value" being passed as the
argument. Local variables of "ArrayType" will be what you would want to
look for.
2,3,4. The calling convention is the same as that of Java. While
arguments themselves are passed by value, these can include reference
variables which refer to objects or arrays (See "RefLikeType"), and each
of these type of arguments can be used in any way by the called method
including changing the contents of the referenced heap memory.
Regards,
Rohan
On Saturday 25 May 2013 09:13 AM, Dean, John wrote:
> Hi all,
>
> 1. Can someone tell me how to detect an array being passed to a Jimple method (i.e., an array base argument in an InvoleExpr)?
> I know how to detect an array reference (instanceof ArrayRef), but that's not what I need; I need the array itself.
>
> 2. Here's why I'm asking the question above. I need to know whether a method is potentially "dangerous" in that it contains an argument that could potentially change something that affects my original calling module. Is it true that Jimple method calls use pass by value in which case I don't need to worry about most argument types?
>
> 3. I don't think pass-by-value will help to make the method call safe if an array is passed (because the array's contents could be changed within the method). Right?
>
> 4. Is it true that there's no way to pass an object to a method, so I don't need to worry about that situation? No objects in Jimple, right?
>
> Thanks,
> John
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
--
Regards,
Rohan Padhye
More information about the Soot-list
mailing list