Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in IR running TestIO#test_readline_limit_0 #1760

Closed
headius opened this issue Jun 23, 2014 · 3 comments
Closed

NPE in IR running TestIO#test_readline_limit_0 #1760

headius opened this issue Jun 23, 2014 · 3 comments
Assignees

Comments

@headius
Copy link
Member

@headius headius commented Jun 23, 2014

Not sure what's up here and have done no investigation. This test is normally excluded.

TestIO#test_readlines_limit_0 = IRBreakJump.java:34:in `create': java.lang.NullPointerException
    from IRRuntimeHelpers.java:143:in `initiateBreak'
    from Interpreter.java:443:in `processReturnOp'
    from Interpreter.java:608:in `interpret'
    from Interpreter.java:680:in `INTERPRET_BLOCK'
    from InterpretedIRBlockBody.java:39:in `commonYieldPath'
    from IRBlockBody.java:133:in `doYield'
    from BlockBody.java:78:in `yield'
    from Block.java:143:in `yield'
    from RubyArray.java:1619:in `reverseEach'
    from RubyArray.java:1628:in `reverse_each'
    from RubyArray$INVOKER$i$0$0$reverse_each.gen:-1:in `call'
    from JavaMethod.java:458:in `call'
    from CachingCallSite.java:79:in `callBlock'
    from CachingCallSite.java:85:in `call'
    from CallBase.java:394:in `interpret'
    from Interpreter.java:376:in `processCall'
    from Interpreter.java:605:in `interpret'
    from Interpreter.java:697:in `INTERPRET_METHOD'
...
@headius
Copy link
Member Author

@headius headius commented Jun 23, 2014

@enebo
Copy link
Member

@enebo enebo commented Jun 27, 2014

Just checked this against 1.7.13 -X-C and we OOM. Weird that this manifests as NPE so we might be catching something somewhere we shouldn't but this test is uncovering an error in our Java bits of IO so I don't know how big of a deal this is:

./bin/jruby -X-C ../jruby/snippets/ir3.rb
Run options: 

# Running tests:

E

Finished tests in 7.920000s, 0.1263 tests/s, 0.0000 assertions/s.

  1) Error:
test_foo(TestIO):
Java::JavaLang::OutOfMemoryError: Java heap space
    org.jruby.RubyArray.realloc(RubyArray.java:366)
    org.jruby.RubyArray.append(RubyArray.java:1144)
    org.jruby.RubyIO.readlinesCommon(RubyIO.java:3562)
    org.jruby.RubyIO.readlines19(RubyIO.java:3550)
    org.jruby.RubyIO$INVOKER$i$0$2$readlines19.call(RubyIO$INVOKER$i$0$2$readlines19.gen)
    org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:665)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
    org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
    org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
    org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
    org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)
    org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157)
    org.jruby.runtime.Block.yield(Block.java:142)
    org.jruby.RubyIO.open(RubyIO.java:1181)
    org.jruby.RubyKernel.open19(RubyKernel.java:349)
    org.jruby.RubyKernel$INVOKER$s$0$3$open19.call(RubyKernel$INVOKER$s$0$3$open19.gen)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:356)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:213)
    org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222)
    org.jruby.ast.FCallTwoArgBlockNode.interpret(FCallTwoArgBlockNode.java:34)
    org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
    org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
    org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)
    org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157)
    org.jruby.runtime.Interpreted19Block.yieldSpecific(Interpreted19Block.java:135)
    org.jruby.runtime.Block.yieldSpecific(Block.java:120)
    org.jruby.ast.YieldOneNode.interpret(YieldOneNode.java:35)
    org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
    org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 15, 2015
@headius headius self-assigned this Jan 15, 2015
@headius
Copy link
Member Author

@headius headius commented Jan 15, 2015

This no longer NPEs on master. It doesn't pass, but yeah.

@headius headius closed this as completed Jan 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants