[Soot-list] ERROR: oops <java.io.FileOutputStream: void <init>(java.lang.String)
Pallavi Majumder
s8pamaju at stud.uni-saarland.de
Thu Jan 12 05:41:12 EST 2017
Hi All,
I want to instrument the below code using soot:
PrintStream writing=new PrintStream(new FileOutputStream("file.txt"));
So I thought I'll start with creating the FileOutputStream object first.
Soot Code:
final Local fileLocal=Jimple.v().newLocal("writing",
RefType.v("java.io.FileOutputStream"));
body.getLocals().add(fileLocal);
units
.insertBefore(Jimple.v()
.newInvokeStmt(Jimple.v()
.newSpecialInvokeExpr(fileLocal, Scene.v()
.getMethod("<java.io.FileOutputStream: void
<init>(java.lang.String)").makeRef(),
StringConstant.v("file.txt"))),stmt);
When I run this it gives the exception:
Worker thread execution failed: oops <java.io.FileOutputStream: void
<init>(java.lang.String)
Does anyone know a solution to this?
Thanks,
Pallavi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170112/f80a3d57/attachment.html
More information about the Soot-list
mailing list