[Soot-list] Soot crashes at Jimple bodycreation
Eric Bodden
bodden at st.informatik.tu-darmstadt.de
Wed Sep 28 17:15:49 EDT 2011
Thanks for reporting this Tillmann.
I have been trying to reproduce this...
Could you send a minimal example that exposes this problem, preferably
a single class without external dependencies?
Cheers,
Eric
On 14 September 2011 02:30, Tillmann Runkel
<tirunkel at informatik.uni-bremen.de> wrote:
> Hi,
>
> i got the problem listed below. It only appears when i create the
> Jimplefiles from Java-Sourcecode and not from compiled Classes.
>
> In my opinion the method below is very simple and i have no idea why the
> nop statement here is problematic (Chain already contains object: nop).
>
> Has anyone any idea when looking at the code?
>
> Thanks in advance.
>
> Tillmann Runkel
>
> Error generating
> com.sun.javaee.blueprints.petstore.captcha.SimpleCaptcha: public
> BufferedImage getCaptchaImage(String message, int w, int h) {
> BufferedImage bufferImg = new BufferedImage(w, h,
> BufferedImage.TYPE_INT_RGB);
> Graphics g = null;
> Graphics g2 = null;
> BufferedImage lastBimg = null;
> try {
> g = bufferImg.getGraphics();
> g.setColor(background);
> g.fillRect(0, 0, w, h);
> g.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 30));
> g.setColor(Color.GRAY);
> drawRandomLine(g, 16);
> drawMessage(g, message);
> ImageProducer source = bufferImg.getSource();
> ImageFilter filter = new BlueFilter();
> ImageProducer producer = new FilteredImageSource(source, filter);
> Image filteredImg =
> Toolkit.getDefaultToolkit().createImage(producer);
> lastBimg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
> g2 = lastBimg.getGraphics();
> g2.drawImage(filteredImg, 0, 0, null);
> }
> finally {
> if(g != null)
> g.dispose();
> if(g2 != null)
> g2.dispose();
> }
> return lastBimg;
> }
> java.lang.RuntimeException: Chain already contains object: nop
> at soot.util.HashChain.addLast(HashChain.java:283)
> at soot.util.HashChain.add(HashChain.java:66)
> at soot.PatchingChain.add(PatchingChain.java:65)
> at soot.JastAddJ.Body.add(Body.java:128)
> at soot.JastAddJ.Body.addLabel(Body.java:154)
> at soot.JastAddJ.IfStmt.jimplify2(IfStmt.java:107)
> at soot.JastAddJ.Block.jimplify2(Block.java:91)
> at soot.JastAddJ.TryStmt.emitFinallyCode(TryStmt.java:179)
> at soot.JastAddJ.TryStmt.emitExceptionHandler(TryStmt.java:278)
> at soot.JastAddJ.TryStmt.jimplify2(TryStmt.java:225)
> at soot.JastAddJ.Block.jimplify2(Block.java:91)
> at soot.JastAddJ.MethodDecl.jimplify2(MethodDecl.java:872)
> at
> soot.JastAddInitialResolver$1.getBody(JastAddInitialResolver.java:127)
> at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
> at soot.SootMethod.retrieveActiveBody(SootMethod.java:315)
> at soot.PackManager.retrieveAllBodies(PackManager.java:989)
> at soot.PackManager.runPacks(PackManager.java:338)
> at
> de.tirunkel.da.analysis.JimpleGeneration.generate(JimpleGeneration.java:93)
> at
> de.tirunkel.da.transformer.Transformer.findReplacementPoints(Transformer.java:90)
> at de.tirunkel.da.main.Controller.main(Controller.java:104)
> at de.tirunkel.da.main.SimulatedStart.main(SimulatedStart.java:37)
> Exception in thread "main" java.lang.NullPointerException
> at
> de.tirunkel.da.transformer.Transformer.findReplacementPoints(Transformer.java:94)
> at de.tirunkel.da.main.Controller.main(Controller.java:104)
> at de.tirunkel.da.main.SimulatedStart.main(SimulatedStart.java:37)
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
--
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478 Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
More information about the Soot-list
mailing list