{"action":"created","issue":{"url":"https://api.github.com/repos/Sable/soot/issues/509","labels_url":"https://api.github.com/repos/Sable/soot/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/Sable/soot/issues/509/comments","events_url":"https://api.github.com/repos/Sable/soot/issues/509/events","html_url":"https://github.com/Sable/soot/issues/509","id":121267430,"number":509,"title":"JLeExpr makeBafInst throw RuntimeException","user":{"login":"martinschaef","id":3271003,"avatar_url":"https://avatars.githubusercontent.com/u/3271003?v=3","gravatar_id":"","url":"https://api.github.com/users/martinschaef","html_url":"https://github.com/martinschaef","followers_url":"https://api.github.com/users/martinschaef/followers","following_url":"https://api.github.com/users/martinschaef/following{/other_user}","gists_url":"https://api.github.com/users/martinschaef/gists{/gist_id}","starred_url":"https://api.github.com/users/martinschaef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinschaef/subscriptions","organizations_url":"https://api.github.com/users/martinschaef/orgs","repos_url":"https://api.github.com/users/martinschaef/repos","events_url":"https://api.github.com/users/martinschaef/events{/privacy}","received_events_url":"https://api.github.com/users/martinschaef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T15:16:26Z","updated_at":"2015-12-09T15:25:47Z","closed_at":null,"body":"Why does JLeExpr.makeBafInst throw a RuntimeException?\r\n\r\nhttps://github.com/Sable/soot/blob/efacd2bbc470c15c68ccc5c0506dc0b25864d775/src/soot/jimple/internal/JLeExpr.java\r\n\r\nWhat is the right way to use <= when modifying a class file?"},"comment":{"url":"https://api.github.com/repos/Sable/soot/issues/comments/163290575","html_url":"https://github.com/Sable/soot/issues/509#issuecomment-163290575","issue_url":"https://api.github.com/repos/Sable/soot/issues/509","id":163290575,"user":{"login":"martinschaef","id":3271003,"avatar_url":"https://avatars.githubusercontent.com/u/3271003?v=3","gravatar_id":"","url":"https://api.github.com/users/martinschaef","html_url":"https://github.com/martinschaef","followers_url":"https://api.github.com/users/martinschaef/followers","following_url":"https://api.github.com/users/martinschaef/following{/other_user}","gists_url":"https://api.github.com/users/martinschaef/gists{/gist_id}","starred_url":"https://api.github.com/users/martinschaef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinschaef/subscriptions","organizations_url":"https://api.github.com/users/martinschaef/orgs","repos_url":"https://api.github.com/users/martinschaef/repos","events_url":"https://api.github.com/users/martinschaef/events{/privacy}","received_events_url":"https://api.github.com/users/martinschaef/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T15:25:47Z","updated_at":"2015-12-09T15:25:47Z","body":"Yes ... I'm adding stmts to guard array access using something like:\r\n\r\n    Expr compare = Jimple.v().newLtExpr(e.getIndex(), len);\r\n\r\nand then I'm writing stuff out using the snippet from your wiki:\r\n\r\n\r\n\t\t// write the class to a file\r\n\t\ttry (OutputStream streamOut = new JasminOutputStream(new FileOutputStream(fileName));\r\n\t\t\t\tPrintWriter writerOut = new PrintWriter(new OutputStreamWriter(streamOut, \"UTF-8\"));) {\r\n\t\t\tAbstractJasminClass jasminClass = new soot.baf.JasminClass(sClass);\r\n\t\t\tjasminClass.print(writerOut);\r\n\t\t\twriterOut.flush();\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\nwhich triggers an exception\r\n\r\njava.lang.RuntimeException: unsupported conversion: i0 < $helper0\r\n\tat soot.jimple.internal.JLtExpr.makeBafInst(JLtExpr.java:42)\r\n\tat soot.jimple.internal.AbstractJimpleIntBinopExpr.convertToBaf(AbstractJimpleIntBinopExpr.java:53)\r\n\tat soot.jimple.internal.JAssignStmt$1.caseLocal(JAssignStmt.java:317)\r\n\tat soot.jimple.internal.JimpleLocal.apply(JimpleLocal.java:104)\r\n\tat soot.jimple.internal.JAssignStmt.convertToBaf(JAssignStmt.java:290)\r\n\tat soot.baf.BafBody.<init>(BafBody.java:92)\r\n\tat soot.baf.Baf.newBody(Baf.java:560)"}}