[Soot-list] JNewExpr and JSpecialInvokeExpr pairs

Bodden, Eric eric.bodden at sit.fraunhofer.de
Sun Feb 1 21:12:16 EST 2015


Hi Nour.

In any valid piece of Jimple, as in Java bytecode, you will have the guarantee that no operations are invoked on a newly created object before its constructor has been called. In other words, assignments to other locals are allowed, but nothing else.

But since assignments are allowed, in the general case you might indeed need a local points-to analysis, depending on what you want to do. So what do you actually want to do?

Cheers,
Eric

> On 01.02.2015, at 20:39, Nouraldin I. Jaber <njaber at purdue.edu> wrote:
> 
> 
> Hello all,
> 
> I hope you're doing well. I have a question about Jimple representation of allocating objects using "new" in Java.
> 
> I know that for example:
> Entry e = new Entry();
> 
> is represented using two statements :a JAssignStmt containing a "JNewExpr" and a JInvokeStmt that contains a "JSpecialInvokeExpr". like this:
> 
> $r1 = new Entry;
> specialinvoke $r1.<Entry: void <init>()>();
> 
> My question is: is there anyway that I can reach one from the other? since there could be statements generated between them that may include assigning "$r1" to other temp locals before calling the invoke, or even another invoke.
> 
> I'm not sure if the AST or any internal structure have them coupled at some point or do I need to trace manually from the assign statement to the invoke statement and use PointsToAnalysis to double check.
> 
> thanks in advance
> 
> Nour
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

--
Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 869-127
Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150202/b4f81b3b/attachment.bin 


More information about the Soot-list mailing list