Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.x+
-
Fix Version/s: JRuby 1.1RC2
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Ubuntu Linux 7.10, JRuby 1.1b1
-
Number of attachments :
Description
Simple line
Generator.new([])
hangs JRuby. Works fine under MRI.
Found during writing new spec tests for Rubinius test suite.
The relevant stack trace:
"main" prio=10 tid=0x08058800 nid=0x5f97 in Object.wait() [0xb7dfb000..0xb7dff218]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x7a783408> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at org.jruby.ext.Generator$GeneratorData.generate(Generator.java:145) - locked <0x7a783408> (a java.lang.Object)
at org.jruby.ext.Generator$GeneratorData.start(Generator.java:110)
at org.jruby.ext.Generator$GeneratorData.setEnum(Generator.java:95)
at org.jruby.ext.Generator.initialize(Generator.java:234)
at org.jruby.ext.GeneratorInvoker$initialize_Sopt.call(Unknown Source)
at org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:67)
at org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.call(FullFunctionCallbackMethod.java:73)
The patch fixes the problem. Also checked that appropriate tests from (yet not integrated rubinius) spec for Generator passed to.