silverbullettt / zipper

Precision-guided context sensitivity for pointer analysis
MIT License
58 stars 12 forks source link

Exceptions during running zipper #1

Closed april1989 closed 5 years ago

april1989 commented 5 years ago

Hi, zipper writer,

This is an interesting work.

I git cloned the zipper repo and followed the instruction to build it. But I have the following exceptions when running my jars:

bz@bz-VirtualBox:~/Documents/zipper/doop$ ./run-zipper.py -jre1.6 2-object-sensitive+heap /home/bz/Documents/zipper/doop/jars/tsp.jar Running pre-analysis ... Bloxbatch-Options: Main-Class: tsp.Tsp Application-Classes: tsp.* generating facts (/home/bz/Documents/zipper/doop/jars/tsp.jar /home/bz/Documents/zipper/doop/jars/empty.jar) in /home/bz/Documents/zipper/doop/cache/input-facts/jre1.6/2089a7800d152ecb119b1382cf012c92b5b7cc18f005fd34f40acbea5588eb5e/ Running JPhantom... Exception in thread "main" java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.(ClassReader.java:170) at org.objectweb.asm.ClassReader.(ClassReader.java:153) at org.objectweb.asm.ClassReader.(ClassReader.java:424) at jphantom.tree.ClassHierarchies.fromJar(ClassHierarchies.java:75) at jphantom.tree.ClassHierarchies.fromJar(ClassHierarchies.java:52) at jphantom.Driver.(Driver.java:51) at jphantom.Driver.(Driver.java:44) at jphantom.Driver.main(Driver.java:314) JPhantom finished executing. Complement created: /home/bz/Documents/zipper/doop/tmp/tsp-complemented.jar ... Adding archive: /home/bz/Documents/zipper/doop/tmp/tsp-complemented.jar java.io.FileNotFoundException: /home/bz/Documents/zipper/doop/tmp/tsp-complemented.jar (No such file or directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at NoSearchingClassProvider.addArchive(NoSearchingClassProvider.java:97) at Main.run(Main.java:192) at Main.main(Main.java:174) Command exited with non-zero status 1 0.11 Dumping doop analysis results ... Analyze temp ... Reading points-to analysis results ... java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at ptatoolkit.zipper.Main.readPointsToAnalysis(Main.java:83) at ptatoolkit.zipper.Main.run(Main.java:37) at ptatoolkit.zipper.Main.main(Main.java:31) Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at java.util.Arrays$ArrayList.get(Arrays.java:3841) at ptatoolkit.doop.factory.ObjFactory.lambda$new$0(ObjFactory.java:23) at java.util.Iterator.forEachRemaining(Iterator.java:116) at ptatoolkit.doop.factory.ObjFactory.(ObjFactory.java:21) at ptatoolkit.zipper.doop.DoopPointsToAnalysis.init(DoopPointsToAnalysis.java:268) at ptatoolkit.zipper.doop.DoopPointsToAnalysis.(DoopPointsToAnalysis.java:72) ... 7 more Exception in thread "main" java.lang.RuntimeException: Reading points-to analysis results fails at ptatoolkit.zipper.Main.readPointsToAnalysis(Main.java:90) at ptatoolkit.zipper.Main.run(Main.java:37) at ptatoolkit.zipper.Main.main(Main.java:31) Running main (Zipper-guided) analysis ... ERROR: Non-existent zipper file "results/temp-ZipperPrecisionCriticalMethod.facts"

Do you have any clue how to fix it? Thanks!

silverbullettt commented 5 years ago

Hi Bozhen, as we discussed, this problem is caused by jphantom included in Doop, and it can be avoided by specifying option "--allow-phantom".