bug in Jython 2.1? VerifyError
Ype Kingma
ykingma at accessforall.nl
Sun May 4 14:27:16 EDT 2003
Irmen,
you wrote:
> I've run into some trouble using Jython 2.1
> (jdk 1.4, 1.3, windows, linux).
>
> The following piece of Python code:
> ----
> def method():
> try:
> for dummy in [1,2,3]:
> try:
> return "result"
> except:
> pass
> finally:
> pass
>
> print method()
> ----
>
> fails to compile in Jython, I get this error:
>
> java.lang.VerifyError: java.lang.VerifyError: (class: test$py, method:
> method$1 signature: (Lorg/python/core/PyFrame;)Lorg/python/core/PyObject;)
> Register 3 contains wrong type
>
>
> That piece of code above seems to be the minimal piece of code to trigger
> the problem. Something to do with nested try blocks and a loop?
>
> Can someone confirm this or help me? Thanks!
I think it is fixed in CVS, have a look at this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jython/bugtests/test371.py
Some of the code there crashes the jython 2.1 compiler in very similar way,
but in the cvs version worked fine when it was checked in.
You might also have a look at the jython 2.1 bug 'outer finally not executed
at return':
http://sourceforge.net/tracker/?group_id=12867&atid=112867&func=detail&aid=577395
Kind regards,
Ype Kingma
--
email at xs4all.nl
More information about the Python-list
mailing list