[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SideEffectAnalysis releases active body



Hi,

SideEffectAnalysis.findNTRWSets(SootMethod method) contains the
following code:

        if( !c.isApplicationClass() ) {
            method.releaseActiveBody();
        }

Why is this necessary?  I'm presetting all the active bodies to the
Shimple form with setActiveBody() -- releasing it here means that SSA
has to be computed again.  Currently Soot just crashes when
SideEffectAnalysis subsequently attempts a method.retrieveActiveBody()
because the MethodSource in SootMethod is set to null by setActiveBody
and there no longer is any way to get a method body.

Also, should SideEffectAnalysis really change the methods being
analysed?  I was assuming that it would give me results without
modifying anything at this point.

I suppose I could/should implement a ShimpleMethodSource and set the
MethodSource for all SootMethods (not sure this is the right thing to
do), but I'd also like to avoid recomputation of SSA if possible.

Thanks,
Navin.

(sent to the soot-list since this covers both SootMethod/MethodSource
and SideEffectAnalysis)