Fix for this problem:



Hi,

I found a performance problem and a maybe-fix for it, which speeds up my
analysis by 5x. The problem is that the active hierarchy is repeatedly
computed when calling Scene.getActiveHierarchy(). The Scene caches the
hierarchy to avoid this redundant computation, but unfortunately Body
contains the following statement (line 701):

        // FIXME: Work around for bug in soot
        Scene.v().releaseActiveHierarchy();

I.e., the cached hierarchy is deleted for each Body that is validated
(I'm using the -validate option). Is this really necessary? The
hierarchy shouldn't change while validating method bodies. As far as I
can tell from running my own analyses, removing the statement doesn't
change the behavior (except for avoiding the redundant computation).

Does anyone remember the reason for the FIXME (it's from October 2004)?
Can it be removed safely? Getting a 5x speedup with such a simple change
would be great.

Thanks,
Michael
fix: regard clinit-edges in ICFG
Do not compute string if Dexpler's debug flag is off.
update dexpler's debug print methods to avoid computing Strings if debug is disabled.
fix cast bug
bug fix: if offset == 0, must use goto/32
Merge branch 'toDexBug' into develop
Bugfix:

When -oaat and -outjar are used together, the output jar file remains empty.

That is because, even with -oaat flag, PackManager:writeOutput is called from soot.Main at line 199. I dont think there is no need for that call because with -oaat flag, the classes have already been output at that point.

The fix is to move that call to writeOutput from Soot.Main to inside the else branch in PackManager.runPacks() method.

Saswat
Merge branch 'develop' of https://github.com/Sable/soot into develop
fixing bug in coffi.ClassFile with DataInputStream.read

On a mac DataInputStream.read is only reading part
of the array. The code is expecting the whole array
to be read so that the cursor is positioned properly
for the next read.

This is triggered when using -include-all on mac
with classes.jar and ui.jar and doing a body
transformer on:
  apple.awt.CDragSourceContextPeer
  com.apple.java.BackwardsCompatibilityTest
Merge pull request #41 from pcpratts/develop

fixing bug in coffi.ClassFile with DataInputStream.read
Update FullSensitiveNode.java

Fix: this pointer filter crashes if ignore-types=true.
Update HeapInsNode.java

Fix: This pointer filter failed when ignore-types=true
Update PtInsNode.java

Fix: this pointer filter failed when ignore-types=true
improved exception class to contain more information on what went wrong
Fix for issue reported by Haichen Shen:

Hi Eric,

I'm Haichen, a PhD student at University of Washington. Recently I've been using soot to do some static analysis on Android apps. I found that a recent commit by you caused some problem. The tag of commit is "Bugfix" (SHA1 ID: f1a3a38ac28b3aa29a8f4b8c376725861ed822b6).

The problem is that you put the writeOutput() from soot.Main.main(String[] args) into soot.PackManager.runPacks(). However, inside writeOutput(), it will call releaseBodies( reachableClasses() ) (Line 435) which deletes all the bodies. If I don't want to call the Main.main(args) but PackManager.v().runPacks() to make soot transform the code from java to jimple, and to make further use of jimple bodies, I will be no longer able to do that.

I'm not sure this issue would be a serious problem. And might there's another way to do this. If so, could you tell me? Otherwise, could you fix it? Thanks.

Best,
Haichen