Project

General

Profile

Actions

Backport #7516

closed

DL::Function#bind causes SEGV when Fiddle is available

Added by ngoto (Naohisa Goto) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:46708]

Description

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)

Actions

Also available in: Atom PDF