Re: Constructor call shadow matches - was: [abc] normal tests (+9f,-9p)

From: Pavel Avgustinov <pavel.avgustinov@magdalen.oxford.ac.uk>
Date: Wed Jul 11 2007 - 14:49:50 BST

On Wednesday 11 July 2007 14:36:23 Eric Bodden wrote:
> The only problem is that this prevents us from applying an
> optimization to the hottest method in antlr ;-)

Hm, if only you could change the JLS... :-)

> > The fact that many of the failures are
> > VerifyErrors suggests that soot requires the newStmt and the call to
> > init to be immediately next to each other, which makes sense (and sounds
> > familiar -- I seem to recall being told that this is how it should be,
> > though I'm not sure). If that's the case, and weaving splits the two up,
> > you'll always have unverifiable code.
>
> No that's not true. The matcher requires it. That's why we have the
> constructor folder. It brings the Jimple code to exactly that shape.
> In terms of the Verifier it must only be guaranteed that <init> is
> called on each newly created object before it is used otherwise.
>
> > In fact, brief experimentation confirms that adding other code (e.g. an
> > AssignStatement) in between the newStmt and the init call results in
> > unverifiable bytecode.
>
> Yes, because that's a use.

You're quite right, and I apologise for letting flawed experiments mislead me.

- P
Received on Wed Jul 11 14:49:58 2007

This archive was generated by hypermail 2.1.8 : Wed Jul 11 2007 - 16:30:09 BST