Broken stdin ( java.lang.OutOfMemoryError ) in Linux environment 
-----------------------------------------------------------------

                 Key: JRUBY-1704
                 URL: http://jira.codehaus.org/browse/JRUBY-1704
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1b1, JRuby 1.0.2
         Environment: Linux Ubuntu  java-6-sun

            Reporter: Sangmin Yu
            Assignee: Thomas E Enebo


Source 'a.rb' have only one line
puts $<.read


result
---------------------------------------------------------
1. cruby
####/tmp$ echo 'This is test input' | ruby a.rb
This is test input

2. jruby in windows 
######jruby-1.0.2\bin>echo Test is test input | jruby a.rb

Test is test input

3. jruby (in java6 at Linux)
##########/tmp$ echo 'This is test input' | jruby a.rb
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size 
exceeds VM limit
        at org.jruby.util.ByteList.grow(ByteList.java:539)
        at org.jruby.util.ByteList.append(ByteList.java:131)
        at 
org.jruby.util.IOHandlerUnseekable.getsEntireStream(IOHandlerUnseekable.java:154)
        at org.jruby.RubyIO.read(RubyIO.java:1187)
        at org.jruby.RubyArgsFile.read(RubyArgsFile.java:373)
        at org.jruby.RubyArgsFileInvoker$read_method_0_2.call(Unknown Source)
        at 
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
        at 
org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:80)
        at a.__file__(a.rb:1)
        at a.load(a.rb)
        at org.jruby.Ruby.runScript(Ruby.java:561)
        at org.jruby.Ruby.runNormally(Ruby.java:483)
        at org.jruby.Ruby.runFromMain(Ruby.java:409)
        at org.jruby.Main.runInterpreter(Main.java:229)
        at org.jruby.Main.runInterpreter(Main.java:185)
        at org.jruby.Main.run(Main.java:117)
        at org.jruby.Main.main(Main.java:92)

------------------------------------------------

I don't exactly know what(jvm or jruby) this bug depend on .

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