[Soot-list] shimple problem in svn; patch included
William Benton
willb at cs.wisc.edu
Thu Jan 17 15:09:44 EST 2008
Soot friends,
I've gotten an ArrayStoreException deep inside shimple consistently
while constructing the SSA representation of a program. I'm running
the latest nightly build; I did not have this problem in 2.2.4.
Here's my environment, in case you need it to reproduce the bug:
Intel Mac, OS X 10.5, Apple JDK 1.5 and 1.6, analyzing against GNU
Classpath 0.92. Running SPARK on any program in whole-shimple mode
will cause this problem. I used the following command-line arguments,
where GNU_CP is the location of the Classpath zip and "foo" is a class
that contains only an empty main method:
java -Xmx2000m soot.Main -cp ${GNU_CP}:. -x soot. -x apple. -x
com.apple. -keep-offset -p cg.spark enabled -via-shimple -ws -full-
resolver -include-all -outjar -output-dir foo.jar -app foo
The problem is on line 102 of SPatchingChain, which tries to construct
an array of Units from an collection of UnitBoxes. I have attached a
very simple patch that seems to eliminate the bug, but I am not by any
means an expert on soot internals, and I might be missing something.
(In case the mailing list strips attachments, the patch is also
available at http://pages.cs.wisc.edu/~willb/soot-3099.diff )
(As an aside, the SPARK fixes in the current SVN head make it *much*
faster than 2.2.4 -- thanks!)
thanks,
wb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soot-3099.diff
Type: application/octet-stream
Size: 974 bytes
Desc: not available
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20080117/ffd0ac16/soot-3099.obj
More information about the Soot-list
mailing list