Closed
Bug 710027
Opened 14 years ago
Closed 14 years ago
java.lang.IllegalArgumentException: bad opcode
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 695354
People
(Reporter: goryachev, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243
Steps to reproduce:
exception running Rhino 1.7R3, works fine in 1.7R2.
attached code illustrates the problem:
// Created by Andy Goryachev <andy@goryachev.com>
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextFactory;
import org.mozilla.javascript.ImporterTopLevel;
public class RhinoTest
{
public static void main(String[] args)
{
ImporterTopLevel scope = new ImporterTopLevel();
Context context = ContextFactory.getGlobal().enterContext();
// fails with Rhino 1.7R3, runs ok with Rhino 1.7R2.
context.evaluateString(scope, "try{} finally {'';}", "", 1, null);
// Exception in thread "main" java.lang.IllegalArgumentException: bad opcode
// at org.mozilla.classfile.ClassFileWriter$StackMapTable.execute(ClassFileWriter.java:2271)
// at org.mozilla.classfile.ClassFileWriter$StackMapTable.executeBlock(ClassFileWriter.java:1739)
// at org.mozilla.classfile.ClassFileWriter$StackMapTable.executeWorkList(ClassFileWriter.java:1719)
// at org.mozilla.classfile.ClassFileWriter$StackMapTable.verify(ClassFileWriter.java:1657)
// at org.mozilla.classfile.ClassFileWriter$StackMapTable.generate(ClassFileWriter.java:1503)
// at org.mozilla.classfile.ClassFileWriter.stopMethod(ClassFileWriter.java:322)
// at org.mozilla.javascript.optimizer.BodyCodegen.generateBodyCode(Codegen.java:1399)
// at org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:341)
// at org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:196)
// at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:105)
// at org.mozilla.javascript.Context.compileImpl(Context.java:2430)
// at org.mozilla.javascript.Context.compileString(Context.java:1367)
// at org.mozilla.javascript.Context.compileString(Context.java:1356)
// at org.mozilla.javascript.Context.evaluateString(Context.java:1108)
}
}
Actual results:
exception
Expected results:
should run to completion with no exception
also, Bugzilla interface has no version 1.7R3, listing for HEAD.
| Reporter | ||
Comment 1•14 years ago
|
||
possibly related to #695354
Comment 2•14 years ago
|
||
Yes, this looks conspicuously like bug #695354, including that I can't reproduce it (your code runs fine for me).
What JDK/JRE version are you using? Can you try with a newer 1.6 and/or 1.7 JDK?
| Reporter | ||
Comment 3•14 years ago
|
||
running on 64 bit jdk1.6.0_24, will try with a different version shortly
| Reporter | ||
Comment 4•14 years ago
|
||
also fails with:
32 bit jdk1.6.0_16
jdk1.7.0_02
Are there any methods/variables I can trace to give you more information?
| Reporter | ||
Comment 5•14 years ago
|
||
Another point to consider: it runs fine with the debugger (org.mozilla.javascript.tools.debugger.Dim) attached.
Comment 6•14 years ago
|
||
Marking as duplicate of #695354
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•