[Soot-list] ExceptionalUnitGraph and nested traps
Patrick Lam
plam at sable.mcgill.ca
Wed Jan 2 11:30:25 EST 2013
On 01/02/13 11:28, Michael Faes wrote:
> Hi Patrick,
>
> Thanks for you answer. I just read this blog post
> http://www.bodden.de/2012/07/26/soot-custom-entry-points/ where Eric
> Bodden points out that initialization code that loads classes should not
> be followed by Soot.main(). So I changed my main method to the
> following, which seems to work.
>
> Options.v().set_via_shimple(true);
> Options.v().set_omit_excepting_unit_edges(true);
> Options.v().set_dump_cfg(Arrays.asList("stp.deadlock"));
> Options.v().parse(args);
>
> final List<String> classes = Options.v().classes();
> for(final String name : classes)
> Scene.v().forceResolve(name, SootClass.BODIES);
>
> Scene.v().loadNecessaryClasses();
> Scene.v().setDefaultThrowAnalysis(new NoVmErrorsThrowAnalysis());
>
> PackManager.v().getPack("stp").add(
> new Transform("stp.deadlock", new MethodSummarizer()));
>
> PackManager.v().runPacks();
>
> So thanks again for your help.
>
> One last thing though: When I activated CFG dumping for my
> "stp.deadlock" pack, I got an exception indicating that a directory
> could not be created. After some investigation, I found that the
> PhaseDumper wanted to create a directory named "void<init>()" which is
> not a valid name (on Windows at least). So in case someone wants to fix
> this (or point out that I made another stupid mistake), here is the
> simple change I had to make:
>
> In java.io.File makeDirectoryIfMissing(final Body b), change
> buf.append(b.getMethod().getSubSignature());
> to
> buf.append(b.getMethod().getSubSignature()
> .replace('<', '[').replace('>', ']'));
Good. Yes, we should commit that. Can you make a git merge request on
github?
pat
More information about the Soot-list
mailing list