Compilation error when mixing case statement with multiple conditions and exception handler (affects Rinda) -----------------------------------------------------------------------------------------------------------
Key: JRUBY-3479 URL: http://jira.codehaus.org/browse/JRUBY-3479 Project: JRuby Issue Type: Bug Components: Compiler Affects Versions: JRuby 1.2 Environment: All Reporter: Jean-Dominique Morani Priority: Blocker Attachments: test.rb When running a ruby script that uses Rinda, the following error is thrown at startup. Enclosed please find a small script to reproduce the issue easily. It appears the problem occurs when mixing case statement with multiple inline conditions and an exception handler that returns the input parameter. java.lang.VerifyError: (class: ruby/jit/ruby/C_3a_/dev/atb/core/trunk/src/bin/jruby/jruby_minus_complete_minus_1_dot_1_dot_6_dot_jar/rinda/tuplespace/get_renewer15084089_15052009, method: rescue_line_149_1 signature: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;) Accessing value from uninitialized register 11 at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.jruby.compiler.JITCompiler.jitThresholdReached(JITCompiler.java:132) at org.jruby.compiler.JITCompiler.jitIsEnabled(JITCompiler.java:89) at org.jruby.compiler.JITCompiler.tryJIT(JITCompiler.java:69) at org.jruby.internal.runtime.methods.DefaultMethod.tryJitReturnMethod(DefaultMethod.java:101) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) at ruby.jit.ruby.C_3a_.dev.atb.core.trunk.src.bin.jruby.jruby_minus_complete_minus_1_dot_1_dot_6_dot_jar.rinda.tuplespace.renew20767108_15052009.__file__(tuplespace.rb:84) at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:145) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) at ruby.jit.ruby.C_3a_.dev.atb.core.trunk.src.bin.jruby.jruby_minus_complete_minus_1_dot_1_dot_6_dot_jar.rinda.tuplespace.initialize20991057_15052009.__file__(tuplespace.rb:30) at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:77) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:108) at org.jruby.javasupport.util.RuntimeHelpers.invokeSuper(RuntimeHelpers.java:454) at org.jruby.ast.SuperNode.interpret(SuperNode.java:107) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:259) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:189) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:199) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206) at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:567) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:187) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:190) at org.jruby.ast.CallThreeArgNode.interpret(CallThreeArgNode.java:61) at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:163) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:110) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.AttrAssignTwoArgNode.interpret(AttrAssignTwoArgNode.java:36) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:192) at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:143) at org.jruby.runtime.Block.yield(Block.java:100) at org.jruby.RubyHash$10.visit(RubyHash.java:1014) at org.jruby.RubyHash.visitAll(RubyHash.java:546) at org.jruby.RubyHash.each(RubyHash.java:1011) at org.jruby.RubyHash$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyHash$i_method_0_0$RUBYFRAMEDINVOKER$each.gen) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86) at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:108) at org.jruby.javasupport.util.RuntimeHelpers.invokeSuper(RuntimeHelpers.java:454) at org.jruby.ast.SuperNode.interpret(SuperNode.java:107) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:144) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:135) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86) at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:549) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:203) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:70) at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:65) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:192) at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:143) at org.jruby.runtime.Block.yield(Block.java:100) at org.jruby.RubyFixnum.times(RubyFixnum.java:250) at org.jruby.RubyInteger$i_method_0_0$RUBYFRAMEDINVOKER$times.call(org/jruby/RubyInteger$i_method_0_0$RUBYFRAMEDINVOKER$times.gen) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:263) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:81) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86) at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:108) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:233) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:41) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:46) at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:543) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:136) at org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:70) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:243) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:32) at org.jruby.ast.FCallManyArgsNode.interpret(FCallManyArgsNode.java:60) at org.jruby.ast.AttrAssignTwoArgNode.interpret(AttrAssignTwoArgNode.java:36) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.IfNode.interpret(IfNode.java:114) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:192) at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:143) at org.jruby.runtime.Block.yield(Block.java:100) at org.jruby.libraries.ThreadLibrary$Mutex.synchronize(ThreadLibrary.java:150) at org.jruby.libraries.ThreadLibrary$Mutex$i_method_0_0$RUBYINVOKER$synchronize.call(org/jruby/libraries/ThreadLibrary$Mutex$i_method_0_0$RUBYINVOKER$synchronize.gen) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:263) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:81) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86) at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:239) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:180) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192) at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:71) at org.jruby.ast.InstAsgnNode.interpret(InstAsgnNode.java:91) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.IfNode.interpret(IfNode.java:114) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:108) at org.jruby.javasupport.util.RuntimeHelpers.invokeSuper(RuntimeHelpers.java:454) at org.jruby.ast.SuperNode.interpret(SuperNode.java:107) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.IfNode.interpret(IfNode.java:112) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:153) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:283) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:121) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126) at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:555) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:152) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.InstAsgnNode.interpret(InstAsgnNode.java:91) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.RescueNode.executeBody(RescueNode.java:225) at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:147) at org.jruby.ast.RescueNode.interpret(RescueNode.java:110) at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:125) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:126) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:253) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:72) at lib.facade.bin.facade.block_2$RUBY$__block__(facade.rb:114) at lib.facade.bin.facadeBlockCallback$block_2$RUBY$__block__xx1.call(Unknown Source) at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:102) at org.jruby.runtime.Block.yield(Block.java:100) at org.jruby.ast.YieldNode.interpret(YieldNode.java:115) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:144) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:135) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:263) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:81) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:96) at lib.facade.bin.facade.method__4$RUBY$start(facade.rb:95) at lib.facade.bin.facadeInvokermethod__4$RUBY$startFixed0.call(facade#start) at lib.facade.bin.facadeInvokermethod__4$RUBY$startFixed0.call(facade#start) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:253) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:72) at lib.facade.bin.facade.rescue_1$RUBY$__rescue___6(facade.rb:140) at lib.facade.bin.facade.__file__(facade.rb:137) at lib.facade.bin.facade.load(facade.rb) at org.jruby.Ruby.runScript(Ruby.java:577) at org.jruby.Ruby.runNormally(Ruby.java:480) at org.jruby.Ruby.runFromMain(Ruby.java:354) at org.jruby.Main.run(Main.java:229) at org.jruby.Main.run(Main.java:110) at org.jruby.Main.main(Main.java:94) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email