oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
3.02k stars 185 forks source link

zopfli: LLVMI32ProfiledValueNodeGen node with values of type com.oracle.truffle.llvm.runtime.pointer.LLVMPointerImpl #1668

Closed deepj closed 2 years ago

deepj commented 5 years ago

To reproduce:

require 'zopfli'

Zopfli.deflate 'string'

Error:

Traceback (most recent call last):
        3: from ~/.rubies/truffleruby-1.0.0-nightly/bin/irb:31:in `<main>'
        2: from (irb):4
        1: from ~/.rubies/truffleruby-1.0.0-nightly/lib/truffle/truffle/cext_ruby.rb:20:in `deflate'
TypeError (Truffle doesn't have a case for the com.oracle.truffle.llvm.nodes.others.LLVMValueProfilingNodeFactory$LLVMI32ProfiledValueNodeGen node with values of type  com.oracle.truffle.llvm.runtime.pointer.LLVMPointerImpl)
deepj commented 5 years ago

Still reproducible in 19.1.0

eregon commented 5 years ago

Still an issue on master:

lib/truffle/truffle/cext_ruby.rb:20:in `deflate': TruffleRuby doesn't have a case for the com.oracle.truffle.llvm.runtime.nodes.others.LLVMValueProfilingNodeFactory$LLVMI32ProfiledValueNodeGen node with values of type  com.oracle.truffle.llvm.runtime.pointer.LLVMPointerImpl (TypeError)
    from com.oracle.truffle.llvm.runtime.nodes.others.LLVMValueProfilingNodeFactory$LLVMI32ProfiledValueNodeGen.executeAndSpecialize(LLVMValueProfilingNodeFactory.java:322)
    from com.oracle.truffle.llvm.runtime.nodes.others.LLVMValueProfilingNodeFactory$LLVMI32ProfiledValueNodeGen.executeI32(LLVMValueProfilingNodeFactory.java:306)
    from com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWriteI32NodeGen.execute(LLVMWriteNodeFactory.java:271)
    from com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlock.execute(LLVMBasicBlockNode.java:158)
    from com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.executeGeneric(LLVMDispatchBasicBlockNode.java:86)
    from com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.executeGeneric(LLVMFunctionRootNode.java:74)
    from com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:78)
    from com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:85)
    from test.rb:3:in `<main>'
deepj commented 2 years ago

@eregon this can be closed

$ ruby -rzopfli -e "p Zopfli.deflate 'string'"
"x\xDA+.)\xCA\xCCK\a\x00\tB\x02\x98"
$ ruby -v                                     
truffleruby 22.2.0-dev-84832be1, like ruby 3.0.3, GraalVM CE Native [aarch64-darwin]