Open akshayutture opened 3 years ago
hi @akshayutture. Is that the same output/error that you get for all those 60 benchmarks?
Hi @karimhamdanali, Actually it is not the same error for all 60 benchmarks. I am sorry I didn't realize that earlier.
I think I see 3 distinct kinds of errors.
1) Missing some no-argument constructor in some class (as in the example shown above)
2) Some method (like 'calculate' in the example below) is not declared.
java.lang.RuntimeException: not declared: calculate
at soot.SootMethod.getDeclaringClass(SootMethod.java:177)
at averroes.soot.CodeGenerator.callApplicationMethodsReflectively(CodeGenerator.java:578)
at averroes.soot.CodeGenerator.createAverroesLibraryDoItAll(CodeGenerator.java:538)
at averroes.soot.CodeGenerator.createAverroesLibraryClass(CodeGenerator.java:259)
at averroes.Main.main(Main.java:126)
3) Error involving resolving level (example below)
Creating the class hierarchy for the placeholder library...
Exception in thread "main" java.lang.ExceptionInInitializerError
at averroes.Main.main(Main.java:88)
Caused by: java.lang.RuntimeException: This operation requires resolving level SIGNATURES but java.util.Calendar is at resolving level DANGLING
If you are extending Soot, try to add the following call before calling soot.Main.main(..):
Scene.v().addBasicClass(java.util.Calendar,SIGNATURES);
Otherwise, try whole-program mode (-w).
at soot.SootClass.checkLevelIgnoreResolving(SootClass.java:183)
at soot.SootClass.checkLevel(SootClass.java:165)
at soot.SootClass.getMethodUnsafe(SootClass.java:546)
at soot.SootMethodRefImpl.tryResolve(SootMethodRefImpl.java:210)
at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:263)
at soot.SootMethodRefImpl.resolve(SootMethodRefImpl.java:183)
at averroes.util.BytecodeUtils.makeSootMethod(BytecodeUtils.java:75)
at org.objectweb.asm.AsmAverroesApplicationConstantPool.findLibraryMethodsInConstantPool(AsmAverroesApplicationConstantPool.java:141)
at org.objectweb.asm.AsmAverroesApplicationConstantPool.findLibraryMethodsInApplicationConstantPool(AsmAverroesApplicationConstantPool.java:282)
at org.objectweb.asm.AsmAverroesApplicationConstantPool.initialize(AsmAverroesApplicationConstantPool.java:113)
at org.objectweb.asm.AsmAverroesApplicationConstantPool.<init>(AsmAverroesApplicationConstantPool.java:39)
at averroes.soot.Hierarchy.findLibraryEntitiesReferencedInApplication(Hierarchy.java:1699)
at averroes.soot.Hierarchy.initialize(Hierarchy.java:1550)
at averroes.soot.Hierarchy.<init>(Hierarchy.java:150)
at averroes.soot.Hierarchy.<clinit>(Hierarchy.java:26)
... 1 more
I can send you the errors logs from all the benchmarks if necessary.
I understand that all these errors could potentially be very time consuming to debug. If that is the case, we can postpone the fixes to a later date.
Hi @akshayutture. Thanks for clarifying that. Issues 1 and 3 seem related, and I think I know how to fix them. I'll have some time to fix both in a couple of weeks.
Issue 2 is the one that I'd need to debug further to know why it is happening. If you have any further details about this one, I'd greatly appreciate it.
Sharing the error logs from the benchmarks might help. Also, if you can point me to where I can download and analyze/run these benchmarks for testing, that would be great.
Thanks.
Here are the error logs averroes.log
The benchmarks themselves are available here (https://zenodo.org/record/4839913#.YOykQS1h0UQ)
Here is the script used to run Averroes on the benchmark set https://drive.google.com/file/d/1entiZGMjPDiBEufQPpi6FwlYPICLe0aG/view?usp=sharing
As of now, I don't have any insight as to why Issue 2 might be occurring, but I shall try to investigate some more.
Thanks Akshay. I have some time to look into those issues over the next week or two. I'll keep you posted as I hopefully resolve them! Thanks for sharing the logs as I'm sure they will be relevant to debugging the issues that you raised.
Thank you for taking the time out to look into the issues. Do let me know if I can provide anything further.
I ran Averroes on the NJR dataset, and it crashes for approximately 60 of 293 benchmarks.
Here is a sample Jar file for which it crashes. https://drive.google.com/file/d/1-YaqC0epGlt8pDF2yrqMW78SI2WFfC6s/view?usp=sharing
Here is the command used to run Averroes
Here is the Averroes output