[ruby-trunk - Bug #7516][Open] DL::Function#bind causes SEGV when Fiddle is available

Issue #7516 has been reported by ngoto (Naohisa G.).


Bug #7516: DL::Function#bind causes SEGV when Fiddle is available
https://bugs.ruby-lang.org/issues/7516

Author: ngoto (Naohisa G.)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-12-05) [x86_64-linux]

The following script causes SEGV in “f.call(123, 456)” when fiddle is
available.
Without Fiddle, it shows correct result.

require ‘dl’
require ‘dl/func’
include DL
f = Function.new(CFunc.new(0, TYPE_INT, ‘test’), [TYPE_INT, TYPE_INT])
f.bind { |x,y| x + y }
p f.call(123, 456)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs