Title: Parsing a simple PEP 342 coroutine crashes Jython 2.5
Type: crash Severity: major
Components: Core Versions: 2.5.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: thobes Nosy List: fwierzbicki, scoder, thobes
Priority: urgent Keywords:

Created on 2009-07-19.14:23:07 by scoder, last changed 2009-07-20.09:45:03 by thobes.

msg4919 (view) Author: Stefan Behnel (scoder) Date: 2009-07-19.14:23:05
I get reproducible crashes when parsing a simple PEP 342 coroutine in
Jython, e.g.

  def dechunk(target):
      while True:
          for item in (yield):

The error is:

java.lang.VerifyError: (class: org/python/pycode/_pyx0, method:
dechunk$1 signature:
Register 3 contains wrong type
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(
        at java.lang.Class.getConstructor0(
        at java.lang.Class.getConstructor(
        at org.python.core.BytecodeLoader.makeCode(
        at org.python.core.CompilerFacade.compile(
        at org.python.core.Py.compile_flags(
        at org.python.core.Py.compile_flags(
        at org.python.core.Py.compile_flags(
        at org.python.util.jython.main(

This is with Jython 2.5.0 final (and latest SVN) on Linux using SUN's
Java 6:

java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
msg4920 (view) Author: Stefan Behnel (scoder) Date: 2009-07-19.14:31:20
Same with Sun JRE
msg4925 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-07-19.22:27:16
reproduced. ouch.
msg4926 (view) Author: Tobias Ivarsson (thobes) Date: 2009-07-20.09:30:09
I know what this is, I've fixed similar problems in other places. I'll
get on it right away.

Here is a smaller sample that causes the same problem:

  def err():
      for item in (yield):
msg4927 (view) Author: Tobias Ivarsson (thobes) Date: 2009-07-20.09:45:02
Fixed in revision 6550.
Date User Action Args
2009-07-20 09:45:03thobessetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg4927
2009-07-20 09:30:09thobessetassignee: fwierzbicki -> thobes
messages: + msg4926
nosy: + thobes
2009-07-20 03:39:57fwierzbickisetassignee: fwierzbicki
2009-07-19 22:27:16fwierzbickisetpriority: high -> urgent
resolution: accepted
messages: + msg4925
2009-07-19 22:25:05fwierzbickisetnosy: + fwierzbicki
2009-07-19 20:08:12pjenveysetpriority: high
2009-07-19 14:31:20scodersetmessages: + msg4920
2009-07-19 14:23:22scodersettype: crash
2009-07-19 14:23:07scodercreate