[Soot-list] Synchronized Sections and soot.

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Sat Feb 13 05:16:16 EST 2010


Hi Richard.

This really depends where the Jimple code originates from. If Soot
produces it from source then there may be some regularity about the
way that Soot produces the code. If Soot produces Jimple from
bytecode, however, then Soot will give you Jimple that does exactly
whatever the bytecode does. In general there is no structural
constraints on how to generate code for synchronized blocks as long as
the code happens to do the right thing at runtime, i.e., lock and
unlock locks at appropriate times and in the right order.

So quite likely your code will break when reading in bytecode
generated from certain compilers.

Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 12 February 2010 20:39, Richard Gill <rg06 at doc.ic.ac.uk> wrote:
> Hi All,
> I have used Soot in order to find synchronized sections and some of my work
> is based on an assumption of how soot represents this in Jimple.
> It is my understanding that the last exitmonitor statement (when you go down
> the program line by line), is always followed by a throw statement. This is
> effectively a try catch which is injected inside the synchronize. Can I
> verify that this injected exitmonitor followed by a throw statement will
> always come last? If it doesn't then my assumptions are incorrect and my
> implementation will probably break at some point.
> Thanks,
> Richard
> _______________________________________________
> 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