On Aug 30, 4:07 am, Attila Szegedi <[EMAIL PROTECTED]> wrote: > It's most likely a bug, but I'll let Norris comment on that -- for > every basic block in a class bytecode of a method, all code paths > entering it must produce a stack of same depth (and also arguments of > the same type); the verifier naturally enforces this. > > The stack trace ain't too helpful here -- if you could submit a JS > script whose compilation triggers this, that'd help. > > Attila. > > On Aug 30, 2008, at 7:31 AM, Matthieu Riou wrote: > > > Hi, > > > I'm getting a java.lang.VerifyError in Rhino, executing a middle sized > > set of Javascript scripts. It's a bit hard to isolate where exactly it > > happens but if the stacktrace helps you narrowing it down, I could > > give it a try. I should also add that it doesn't happen with -opt -1 > > (which is logical as it seems to be in the compiler). > > > Let me know if I should file a bug in Bugzilla. > > > Thanks, > > Matthieu > > > Exception in thread "main" java.lang.VerifyError: (class: org/mozilla/ > > javascript/gen/c1, method: _c0 signature: (Lorg/mozilla/javascript/ > > gen/ > > c1;Lorg/mozilla/javascript/Context;Lorg/mozilla/javascript/ > > Scriptable;Lorg/mozilla/javascript/Scriptable;[Ljava/lang/ > > Object;)Ljava/lang/Object;) Inconsistent stack height 1 != 0 > > at java.lang.Class.getDeclaredConstructors0(Native Method) > > at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) > > at java.lang.Class.getConstructor0(Class.java:2699) > > at java.lang.Class.newInstance0(Class.java:326) > > at java.lang.Class.newInstance(Class.java:308) > > at > > org > > .mozilla.javascript.optimizer.Codegen.createScriptObject(Codegen.java: > > 105) > > at org.mozilla.javascript.Context.compileImpl(Context.java:2409) > > at org.mozilla.javascript.Context.compileString(Context.java:1359) > > at org.mozilla.javascript.Context.compileString(Context.java:1348) > > at > > org > > .mozilla.javascript.tools.shell.Main.loadScriptFromSource(Main.java: > > 456) > > at > > org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java: > > 444) > > at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:413) > > at org.mozilla.javascript.tools.shell.Main.processSource(Main.java: > > 404) > > at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java: > > 179) > > at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100) > > at org.mozilla.javascript.Context.call(Context.java:515) > > at org.mozilla.javascript.ContextFactory.call(ContextFactory.java: > > 507) > > at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162) > > at org.mozilla.javascript.tools.shell.Main.main(Main.java:140)
Yes, Attila is right. Any VerifyError on a class generated by Rhino is a bug. And it should be possible to find some JavaScript source that will cause the VerifyError when compiled. Thanks, Norris _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
