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

Posted by ngoto (Naohisa Goto) (Guest)
on 2012-12-05 14:13
(Received via mailing list)
Issue #7516 has been reported by ngoto (Naohisa Goto).

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

Author: ngoto (Naohisa Goto)
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)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.