[Soot-list] Soot 2.5 vs current version - Duplicate Member error

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Sun Nov 3 21:53:13 EST 2013


Hello Guru,

There are two things I am thinking here. At first, I wanted to
double-check if you set a priority for the .java files when you run that
test case. Otherwise, .class gets read first, so something may break
when reading .java (I think I had cases like that at some point)

You can check the -src-prec option here
http://www.sable.mcgill.ca/soot/tutorial/usage/usage.html#SECTION00042000000000000000

If that is ruled out, I'd post a minimal working example as a bug in
github. Eric has been upgrading the Java front-end and you may have hit
an edge case.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 28/10/13 11:15 AM, Guru Devanla wrote:
> Hello Soot-List,
> 
> I may be doing something silly here.  I have a command line which goes
> like this:
> 
> java -cp sootfiles.jar soot.Main -cp <MyAppFiles> -w
>  somepackage.package2.A Somepackage.package2.B
> 
> My MyAppFiles have the two java files somepackage/package2/A.java and
> somepackage/package2/B.java places under respective package
> 
> when I run this with soot 2.5 everything runs fine.
> 
> When I run with dev branch, I get the following error:
> 
> /private/tmp/myapp/somepackage/package2/B.java:3:
>   Semantic Error: duplicate member B in compilation unit
> Exception in thread "main" soot.CompilationDeathException: there were
> errors during parsing and/or type checking (JastAdd frontend)
> at soot.JastAddInitialResolver.formAst(JastAddInitialResolver.java:63)
> at soot.JavaClassSource.resolve(JavaClassSource.java:54)
> at soot.SootResolver.bringToHierarchy(SootResolver.java:226)
> at soot.SootResolver.bringToSignatures(SootResolver.java:250)
> at soot.SootResolver.bringToBodies(SootResolver.java:291)
> at soot.SootResolver.processResolveWorklist(SootResolver.java:161)
> at soot.SootResolver.resolveClass(SootResolver.java:127)
> at soot.Scene.loadClass(Scene.java:610)
> at soot.Scene.loadClassAndSupport(Scene.java:595)
> at soot.Scene.loadNecessaryClass(Scene.java:1221)
> at soot.Scene.loadNecessaryClasses(Scene.java:1235)
> at soot.Main.run(Main.java:167)
> at soot.Main.main(Main.java:141)
> 
> 
> I do not see this error if I process .class files directly. So, this
> seems to happen only while processing .java files.
> 
> I lost some time chasing this bug. Any tips on what I am doing wrong
> would help.
> 
> Thanks
> Guru
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list