Skip to content

[Truffle] Dollar underscore issue #2951

@bjfish

Description

@bjfish

This blocks the csv library.
Example

while true
  # usually assigned by `gets` in stringio.rb
  # but `gets` does a similar assignment
  # and results in the same error
   test = $_ = nil 
   break unless test
end
puts "Done"

Expected

$ ruby strerr.rb 
Done

Actual

$ ~/Documents/jruby/bin/jruby -X+T -Xtruffle.exceptions.print_java strerr.rb 
Truffle internal error: com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for BooleanCastNodeGen@68f44fdb: [org.jruby.truffle.nodes.globals.WrapInThreadLocalNode$1@7fa6e8b1]
com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for BooleanCastNodeGen@68f44fdb: [org.jruby.truffle.nodes.globals.WrapInThreadLocalNode$1@7fa6e8b1]
    at com.oracle.truffle.api.dsl.internal.SpecializationNode.unsupported(SpecializationNode.java:480)
    at com.oracle.truffle.api.dsl.internal.SpecializationNode.uninitialized(SpecializationNode.java:397)
    at org.jruby.truffle.nodes.cast.BooleanCastNodeGen$UninitializedNode_.executeBoolean0(BooleanCastNodeGen.java:202)
    at org.jruby.truffle.nodes.cast.BooleanCastNodeGen$BaseNode_.execute(BooleanCastNodeGen.java:105)
    at org.jruby.truffle.nodes.cast.BooleanCastNodeGen$BaseNode_.executeBoolean1(BooleanCastNodeGen.java:109)
    at org.jruby.truffle.nodes.cast.BooleanCastNodeGen.executeBoolean(BooleanCastNodeGen.java:58)
    at org.jruby.truffle.nodes.control.IfNode.execute(IfNode.java:51)
    at org.jruby.truffle.nodes.control.SequenceNode.execute(SequenceNode.java:85)
    at org.jruby.truffle.nodes.control.WhileNode$WhileRepeatingNode.executeRepeating(WhileNode.java:83)
    at com.oracle.truffle.api.impl.DefaultLoopNode.executeLoop(DefaultLoopNode.java:45)
    at org.jruby.truffle.nodes.control.WhileNode.execute(WhileNode.java:47)
    at org.jruby.truffle.nodes.methods.CatchBreakFromCallNode.execute(CatchBreakFromCallNode.java:42)
    at org.jruby.truffle.nodes.RubyNode.executeVoid(RubyNode.java:59)
    at org.jruby.truffle.nodes.control.SequenceNode.execute(SequenceNode.java:82)
    at org.jruby.truffle.nodes.methods.CatchNextNode.execute(CatchNextNode.java:36)
    at org.jruby.truffle.nodes.methods.CatchReturnAsErrorNode.execute(CatchReturnAsErrorNode.java:35)
    at org.jruby.truffle.nodes.methods.CatchRetryAsErrorNode.execute(CatchRetryAsErrorNode.java:32)
    at org.jruby.truffle.nodes.methods.SetMethodDeclarationContext.execute(SetMethodDeclarationContext.java:46)
    at org.jruby.truffle.nodes.control.SequenceNode.execute(SequenceNode.java:85)
    at org.jruby.truffle.nodes.exceptions.TopLevelRaiseHandler.execute(TopLevelRaiseHandler.java:33)
    at org.jruby.truffle.nodes.RubyRootNode.execute(RubyRootNode.java:57)
    at com.oracle.truffle.api.impl.DefaultCallTarget.call(DefaultCallTarget.java:76)
    at org.jruby.truffle.runtime.RubyContext.execute(RubyContext.java:349)
    at org.jruby.truffle.runtime.RubyContext.execute(RubyContext.java:338)
    at org.jruby.truffle.runtime.RubyContext.load(RubyContext.java:282)
    at org.jruby.truffle.runtime.RubyContext.execute(RubyContext.java:664)
    at org.jruby.Ruby.runInterpreter(Ruby.java:871)
    at org.jruby.Ruby.runInterpreter(Ruby.java:885)
    at org.jruby.Ruby.runNormally(Ruby.java:757)
    at org.jruby.Ruby.runFromMain(Ruby.java:574)
    at org.jruby.Main.doRunFromMain(Main.java:401)
    at org.jruby.Main.internalRun(Main.java:296)
    at org.jruby.Main.run(Main.java:225)
    at org.jruby.Main.main(Main.java:197)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions