Actions
Bug #8692
closedsegv in fiddle
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-07-26 trunk 42177) [x86_64-darwin12.4.0]
Backport:
Description
=begin
require 'fiddle'
libc = Fiddle.dlopen('libc.dylib')
time = Fiddle::Function.new( libc['time'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_VOIDP )
puts time.call(nil)
stack trace: ((URL:https://gist.github.com/zzak/6085700))
=end
Updated by zzak (zzak _) over 11 years ago
- Description updated (diff)
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Description updated (diff)
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Open to Rejected
=begin
(({time()})) returns (({time_t})), not pointer.
As Fiddle doesn't provide (({TYPE_TIME_T})) currently, you have to use (({TYPE_LONG})) instead.
require 'fiddle'
libc = Fiddle.dlopen(nil)
time = Fiddle::Function.new(libc['time'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_LONG)
puts time.call(nil)
=end
Actions
Like0
Like0Like0Like0