Skip to content

FFI::MemoryPointer#read_pointer type size differs from CRuby / JRuby #3837

Open
@ankane

Description

@ankane

Hi, wanted to share a small inconsistency with CRuby / JRuby FFI.

require "ffi"

ptr = FFI::MemoryPointer.new(:pointer)
p ptr.read_pointer.type_size
p ptr.read_pointer[0]

CRuby 3.3.5 / JRuby 10.0.0.0

1
#<FFI::Pointer address=0x0000000000000000>

TruffleRuby 24.2.0

nil
<internal:core> core/truffle/ffi/pointer.rb:128:in `[]': unknown type size (ArgumentError)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions