[Soot-list] Soot unable to load class
Pegah Jandaghi
jandaghi72 at gmail.com
Mon Jun 22 18:38:17 EDT 2015
Hi everyone
I'm trying to create Unit graph for classes of a java library. I use the
following code for building this graph:
String sep = File.separator;
String pathSep = File.pathSeparator;
String path =System.getProperty("java.home") + sep + "lib" + sep + "rt.jar"
pathSep;
path += System.getProperty("java.home") + sep+"lib" + sep + "jce.jar";
path += pathSep + classPath;
Options.v().set_soot_classpath(path);
Options.v().set_keep_line_number(true);
Options.v().setPhaseOption("jb", "use-original-names:true");
SootClass sClass = Scene.v().forceResolve(className, SootClass.BODIES);
sClass.setApplicationClass();
Scene.v().allowsPhantomRefs();
sClass.getMethodByName(methodName).retrieveActiveBody();
Body body = sootMethod.retrieveActiveBody();
UnitGraph graph = new EnhancedUnitGraph(body);
This code works for some classes but gives following exception on on line
"SootClass sClass = Scene.v().forceResolve(className, SootClass.BODIES);"
for some other classes.
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:215)
at soot.SootResolver.processResolveWorklist(SootResolver.java:155)
at soot.SootResolver.resolveClass(SootResolver.java:124)
at soot.Scene.forceResolve(Scene.java:1279)
at automatic.main(automatic.java:69)
Does anyone knows why this gives exception for some classes?
Thanks for help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150623/c058613b/attachment-0001.html
More information about the Soot-list
mailing list