Regression: rubyspec run with -V option breaks JRuby
----------------------------------------------------

                 Key: JRUBY-2285
                 URL: http://jira.codehaus.org/browse/JRUBY-2285
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC2
         Environment: Latest JRuby 1.1RC2
            Reporter: Vladimir Sizikov
            Priority: Critical
             Fix For: JRuby 1.1


Changes in rev. r6233 " Additional fixes to get reopen, popen, and seeking 
working correctly with various types of streams", lead to JRuby  blowing up 
when runing some IO rubyspecs with -V mspec option:

{noformat}
bin/mspec -V -t j spec/ruby/1.8/core/io/print*.rb

spec/ruby/1.8/core/io/printf_spec.rb
Exception in thread "main" java.nio.BufferOverflowException
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:165)
        at org.jruby.util.io.ChannelStream.bufferedWrite(ChannelStream.java:636)
        at org.jruby.util.io.ChannelStream.fwrite(ChannelStream.java:749)
        at org.jruby.RubyIO.fwrite(RubyIO.java:1153)
        at org.jruby.RubyIO.write(RubyIO.java:994)
        at org.jruby.RubyIOInvoker$write_method_1_0.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOne.call(JavaMethod.java:120)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:82)
        at org.jruby.RubyClass.invoke(RubyClass.java:249)
        at 
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:318)
        at org.jruby.RubyObject.callMethod(RubyObject.java:469)
        at org.jruby.RubyIO.print(RubyIO.java:1311)
        at org.jruby.RubyIOInvoker$print_method_0_0.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodNoBlock.call(JavaMethod.java:63)
        at org.jruby.RubyClass.invoke(RubyClass.java:236)
        at 
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:314)
        at org.jruby.RubyObject.callMethod(RubyObject.java:472)
        at org.jruby.RubyKernel.print(RubyKernel.java:367)
        at org.jruby.RubyKernelInvoker$print_s_method_0_0.call(Unknown Source)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:240)
        at 
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1100)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
        at org.jruby.RubyObject.send(RubyObject.java:1173)
        at org.jruby.RubyObjectInvoker$send_method_1_0.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:102)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:243)
        at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:657)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
        at org.jruby.runtime.Block.yield(Block.java:109)
        at org.jruby.RubyArray.each(RubyArray.java:1179)
        at org.jruby.RubyArrayInvoker$each_method_0_0.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:101)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:253)
        at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:662)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:240)
        at 
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1100)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
        at org.jruby.runtime.Block.yield(Block.java:109)
        at org.jruby.RubyArray.each(RubyArray.java:1179)
        at org.jruby.RubyArrayInvoker$each_method_0_0.call(Unknown Source)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:101)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:87)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:256)
        at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:662)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:308)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:70)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:117)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:275)
        at 
org.jruby.evaluator.ASTInterpreter.vcallNode(ASTInterpreter.java:1748)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:484)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:631)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:302)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:176)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:70)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:117)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:275)
        at 
ruby.opt.work.rbx_dot_git.mspec.bin.mspec_minus_run.__file__(mspec/bin/mspec-run:68)
        at 
ruby.opt.work.rbx_dot_git.mspec.bin.mspec_minus_run.load(mspec/bin/mspec-run)
        at org.jruby.Ruby.runScript(Ruby.java:510)
        at org.jruby.Ruby.runNormally(Ruby.java:430)
        at org.jruby.Ruby.runFromMain(Ruby.java:310)
        at org.jruby.Main.run(Main.java:141)
        at org.jruby.Main.run(Main.java:88)
        at org.jruby.Main.main(Main.java:79)
{noformat}

-- 
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


Reply via email to