Re: ASM 4.0 RC2: Revisiting the NOP ATHROW bug
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CAOrbxLTD5Q7vvrOEXYTwniohYREjPeOQKjAV6FX6Sq_Aq4mTRQ@mail.gmail.com> |
On Sun, Oct 23, 2011 at 12:53 PM, Eric Bruneton <[email protected]> wrote: > the try/catch is still missing (there should be a visitTryCatchBlock > somewhere); also you probably cut the visitMaxs and visitEnd. Can you also > run javap -c -v to show the stack frames (or show the result of > TraceClassVisitor)? And a description of the verifier error you get? > Third time is the charm :). So here is another try, The python program: def addsitedir(sitedir, known_paths=None): if known_paths is None: reset = 1 try: names = os.listdir(sitedir) except os.error: return return known_paths if __name__ == '__main__': _test() Gives an error: Exception in thread "main" java.lang.VerifyError: Stack map does not match the one at exception handler 103 in method site$py._addsitedir$1(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; at offset 88 at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) at java.lang.Class.getConstructor0(Class.java:2714) at java.lang.Class.getConstructor(Class.java:1674) at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:68) at org.python.core.imp.createFromSource(imp.java:350) at org.python.core.imp.loadFromSource(imp.java:578) at org.python.core.imp.find_module(imp.java:475) at org.python.core.imp.import_next(imp.java:715) at org.python.core.imp.import_first(imp.java:736) at org.python.core.imp.load(imp.java:628) at org.python.util.jython.run(jython.java:183) at org.python.util.jython.main(jython.java:134) The generated class file is here: http://pylonshq.com/pasties/1a43b011ac411cba6cc9fcb88ef5254a The method of interest is _addsitedir which starts at line 442. The ASM generated code is at: http://pylonshq.com/pasties/378d9ad2bc539623fb08d510f4da81cf and again the method begins at line 93. There are no visitMaxs or visitEnds in the code as I had difficulty getting them to integrate into the Jython system, but jython calls these two methods (for each of the generated methods) after the whole class has been compiled. The trycatch had escaped before since I did not handle the labels appropriately, but that should now be fixed. Eric > Thanks, Shashank
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws