[Soot-list] Soot plugin for Eclipse doesn't work on Windows

Denis Bogdanas denis.bogdanas at gmail.com
Sun Mar 13 23:08:27 EDT 2016


I just tried to right click on some java file from eclipse -> soot ->
convert into Jimple.

As you see I'm using openjdk 7. Could this be the problem?


On 13 March 2016 at 05:15, Steven Arzt <Steven.Arzt at cased.de> wrote:

> Hi Denis,
>
>
>
> That’s strange. From the stack trace, I see that you are using the
> JastAddJ frontend for loading Java source code. Have you tried to switch to
> the bytecode frontend and read bytecode instead of source code? We are
> currently working on a new source code frontend anyway as the old one is
> stuck with Java 1.5. That could potentially also be a part of the problem.
>
>
>
> Best regards,
>
>   Steven
>
>
>
> *Von:* soot-list-bounces at CS.McGill.CA [mailto:
> soot-list-bounces at CS.McGill.CA] *Im Auftrag von *Denis Bogdanas
> *Gesendet:* Sonntag, 13. März 2016 04:46
> *An:* Steven Arzt; soot-list at cs.mcgill.ca
> *Betreff:* Re: [Soot-list] Soot plugin for Eclipse doesn't work on Windows
>
>
>
> Hi Steven,
>
> I've looked into this issue. The problem doesn't seem to be caused by
> paths after all.
>
> Even if I manually correct the paths and run something like this:
>
> soot.Main --keep-line-number --xml-attributes --f J --src-prec java --cp
> D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jsse.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/rt.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/charsets.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/zipfs.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jce.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/dnsns.jar;D:/jimple-example/src;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunpkcs11.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/resources.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/localedata.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunec.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunmscapi.jar;D:/eclipse-workspaces/runtime-New_configuration/jimple-example/bin/;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunjce_provider.jar;;D:/eclipse-workspaces/runtime-New_configuration/jimple-example/src;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/resources.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/rt.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jsse.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jce.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/charsets.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/dnsns.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/localedata.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunec.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunjce_provider.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunmscapi.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunpkcs11.jar;D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/zipfs.jar
> --d
> D:/eclipse-workspaces/runtime-New_configuration/jimple-example/sootOutput
> JimpleExample
>
> I get the output:
>
> java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at ca.mcgill.sable.soot.launching.SootThread.run(SootThread.java:138)
> Caused by: java.lang.Error: Error loading java.lang.CharSequence
>     at soot.JastAddJ.PathPart.getCompilationUnit(PathPart.java:130)
>     at soot.JastAddJ.Program.getCompilationUnit(Program.java:930)
>     at soot.JastAddJ.Program.lookupType_compute(Program.java:1466)
>     at soot.JastAddJ.Program.lookupType(Program.java:1447)
>     at soot.JastAddJ.Program.Define_TypeDecl_lookupType(Program.java:1941)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1646)
>     at soot.JastAddJ.Expr.lookupType(Expr.java:1285)
>     at soot.JastAddJ.TypeAccess.decls_compute(TypeAccess.java:388)
>     at soot.JastAddJ.TypeAccess.decls(TypeAccess.java:377)
>     at
> soot.JastAddJ.TypeAccess.refined_TypeScopePropagation_TypeAccess_decl(TypeAccess.java:350)
>     at soot.JastAddJ.TypeAccess.decl_compute(TypeAccess.java:423)
>     at soot.JastAddJ.TypeAccess.decl(TypeAccess.java:415)
>     at soot.JastAddJ.TypeAccess.type_compute(TypeAccess.java:585)
>     at soot.JastAddJ.TypeAccess.type(TypeAccess.java:578)
>     at
> soot.JastAddJ.ParameterDeclaration.type_compute(ParameterDeclaration.java:452)
>     at
> soot.JastAddJ.ParameterDeclaration.type(ParameterDeclaration.java:445)
>     at soot.JastAddJ.MethodDecl.signature_compute(MethodDecl.java:1251)
>     at soot.JastAddJ.MethodDecl.signature(MethodDecl.java:1239)
>     at
> soot.JastAddJ.TypeDecl.localMethodsSignatureMap_compute(TypeDecl.java:2545)
>     at soot.JastAddJ.TypeDecl.localMethodsSignatureMap(TypeDecl.java:2533)
>     at
> soot.JastAddJ.ClassDecl.methodsSignatureMap_compute(ClassDecl.java:1046)
>     at soot.JastAddJ.ClassDecl.methodsSignatureMap(ClassDecl.java:1038)
>     at soot.JastAddJ.TypeDecl$2.<init>(TypeDecl.java:452)
>     at soot.JastAddJ.TypeDecl.methodsIterator(TypeDecl.java:451)
>     at soot.JastAddJ.TypeDecl.methodsNameMap_compute(TypeDecl.java:2482)
>     at soot.JastAddJ.TypeDecl.methodsNameMap(TypeDecl.java:2473)
>     at soot.JastAddJ.TypeDecl.memberMethods_compute(TypeDecl.java:2448)
>     at soot.JastAddJ.TypeDecl.memberMethods(TypeDecl.java:2441)
>     at
> soot.JastAddJ.AbstractDot.Define_Collection_lookupMethod(AbstractDot.java:849)
>     at soot.JastAddJ.Expr.lookupMethod(Expr.java:1131)
>     at soot.JastAddJ.MethodAccess.decls_compute(MethodAccess.java:1035)
>     at soot.JastAddJ.MethodAccess.decls(MethodAccess.java:1027)
>     at soot.JastAddJ.MethodAccess.decl_compute(MethodAccess.java:1069)
>     at soot.JastAddJ.MethodAccess.decl(MethodAccess.java:1061)
>     at soot.JastAddJ.MethodAccess.nameCheck(MethodAccess.java:197)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:298)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.ASTNode.collectErrors(ASTNode.java:306)
>     at soot.JastAddJ.CompilationUnit.errorCheck(CompilationUnit.java:169)
>     at soot.JastAddInitialResolver.formAst(JastAddInitialResolver.java:58)
>     at soot.JavaClassSource.resolve(JavaClassSource.java:54)
>     at soot.SootResolver.bringToHierarchy(SootResolver.java:215)
>     at soot.SootResolver.bringToSignatures(SootResolver.java:239)
>     at soot.SootResolver.processResolveWorklist(SootResolver.java:154)
>     at soot.SootResolver.resolveClass(SootResolver.java:124)
>     at soot.Scene.loadClass(Scene.java:448)
>     at soot.Scene.loadClassAndSupport(Scene.java:433)
>     at soot.Scene.loadNecessaryClass(Scene.java:1053)
>     at soot.Scene.loadNecessaryClasses(Scene.java:1067)
>     at soot.Main.run(Main.java:167)
>     at soot.Main.main(Main.java:141)
>     ... 5 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 4608
>     at soot.JastAddJ.BytecodeParser.parseThisClass(BytecodeParser.java:439)
>     at soot.JastAddJ.BytecodeParser.parseTypeDecl(BytecodeParser.java:406)
>     at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:333)
>     at soot.JastAddJ.BytecodeParser.read(BytecodeParser.java:29)
>     at soot.JastAddJ.PathPart.getCompilationUnit(PathPart.java:117)
>     ... 74 more
>
>
>
>
>
> Everything is compiled with openjdk 1.7. Used the latest soot, compiled
> from sources.
>
> Is the plugin working on Linux?
>
>
>
> On 11 March 2016 at 16:23, Denis Bogdanas <denis.bogdanas at gmail.com>
> wrote:
>
> Ok, will take a look into it.
>
>
>
> On 11 March 2016 at 08:09, Steven Arzt <Steven.Arzt at cased.de> wrote:
>
> Hi Denis,
>
>
>
> The Soot Eclipse plugin is contained in the normal Soot repository on
> Github. The trailing slash seems to be the problem as Windows will usually
> also accept slashes as delimiters nowadays. Can you try to fix it (should
> be simple) and open a pull request on Github?
>
>
>
> Best regards,
>
>   Steven
>
>
>
> *Von:* soot-list-bounces at CS.McGill.CA [mailto:
> soot-list-bounces at CS.McGill.CA] *Im Auftrag von *Denis Bogdanas
> *Gesendet:* Montag, 7. März 2016 20:45
> *An:* soot
> *Betreff:* [Soot-list] Soot plugin for Eclipse doesn't work on Windows
>
>
>
> Not something critical, just a bug report.
>
> By the way, is eclipse plugin available on github?
>
> The "--cp" value produced by Soot doesn't like windows file names. This is
> what soot plugin tries to run:
>
> soot.Main --keep-line-number --xml-attributes --f J --src-prec java --cp
> /D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jsse.jar;/D:/soot-guide/call_graph/src;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/dnsns.jar;/D:/soot-guide/lib/polyglotclasses-1.3.5.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunec.jar;/D:/soot;/D:/soot-guide/pointsto/src;/D:/soot-guide/my_code/src;/D:/soot-guide/intermediate_representation/src;/D:/soot-guide/pointsto/test;/D:/soot-guide/representations/shimple;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/rt.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/charsets.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/zipfs.jar;/D:/soot-guide/lib/paddle-nightly.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/jce.jar;/D:/dp/soot-guide/out/;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunpkcs11.jar;/D:/soot-guide/representations/grimp;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/resources.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/localedata.jar;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunmscapi.jar;/D:/soot-guide/representations/jimple;/D:/soot-guide/analysis_framework/src;/D:/ProgramFiles_no_spaces/OpenJDK_7/jre/lib/ext/sunjce_provider.jar;;D:\dp\soot-guide\representations\jimple;D:\dp\soot-guide\lib\paddle-nightly.jar;D:\dp\soot-guide\lib\polyglotclasses-1.3.5.jar;D:\dp\heros\slf4j-api-1.7.5.jar;D:\dp\heros\slf4j-simple-1.7.5.jar;D:\dp\heros\guava-18.0.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\resources.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\rt.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\jsse.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\jce.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\charsets.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\dnsns.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\localedata.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\sunec.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\sunjce_provider.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\sunmscapi.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\sunpkcs11.jar;D:\ProgramFiles_no_spaces\OpenJDK_7\jre\lib\ext\zipfs.jar
> --d D:\dp\soot-guide\sootOutput JimpleExample
>
> Result:
>
> java.lang.Error: Error loading java.lang.CharSequence
>
>
>
> --
>
> Denis
>
>
>
>
> --
>
> Denis
>



-- 
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160313/d08004d3/attachment-0001.html 


More information about the Soot-list mailing list