* [ruby-dev:45616] [ruby-trunk - Bug #6400][Assigned] dl/callback with fiddle occurs SEGV on NetBSD amd64
@ 2012-05-04 12:33 naruse (Yui NARUSE)
2012-05-04 14:10 ` [ruby-dev:45621] [ruby-trunk - Bug #6400] " naruse (Yui NARUSE)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: naruse (Yui NARUSE) @ 2012-05-04 12:33 UTC (permalink / raw)
To: ruby developers list
Issue #6400 has been reported by naruse (Yui NARUSE).
----------------------------------------
Bug #6400: dl/callback with fiddle occurs SEGV on NetBSD amd64
https://bugs.ruby-lang.org/issues/6400
Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
On NetBSD amd64, libffi with callback occurs SEGV as following.
kelvena% ./ruby p
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55: [BUG] Segmentation fault
ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :call
c:0004 p:0059 s:0018 b:0018 l:000017 d:000017 METHOD /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.
rb:55
c:0003 p:0157 s:0010 b:0010 l:001db8 d:0021a8 EVAL p:11
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001db8 d:001db8 TOP
-- Ruby level backtrace information ----------------------------------------
p:11:in `<main>'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
-- Other runtime information -----------------------------------------------
* Loaded script: p
* Loaded features:
0 enumerator.so
1 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/encdb.so
2 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/trans/transdb.so
3 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/defaults.rb
4 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/rbconfig.rb
5 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/deprecate.rb
6 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/exceptions.rb
7 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/custom_require.rb
8 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems.rb
9 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/dl.so
10 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/fiddle.so
11 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/function.rb
12 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/closure.rb
13 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle.rb
14 /home/naruse/local/ruby/lib/ruby/2.0.0/dl.rb
15 /home/naruse/local/ruby/lib/ruby/2.0.0/thread.rb
16 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/callback.rb
17 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/stack.rb
18 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/value.rb
19 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
zsh: abort (core dumped) ./ruby p
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:45621] [ruby-trunk - Bug #6400] dl/callback with fiddle occurs SEGV on NetBSD amd64
2012-05-04 12:33 [ruby-dev:45616] [ruby-trunk - Bug #6400][Assigned] dl/callback with fiddle occurs SEGV on NetBSD amd64 naruse (Yui NARUSE)
@ 2012-05-04 14:10 ` naruse (Yui NARUSE)
2013-08-14 20:06 ` [ruby-dev:47626] " zzak (Zachary Scott)
2019-10-22 17:07 ` [ruby-dev:50853] [Ruby master Bug#6400] " merch-redmine
2 siblings, 0 replies; 4+ messages in thread
From: naruse (Yui NARUSE) @ 2012-05-04 14:10 UTC (permalink / raw)
To: ruby developers list
Issue #6400 has been updated by naruse (Yui NARUSE).
Description updated
----------------------------------------
Bug #6400: dl/callback with fiddle occurs SEGV on NetBSD amd64
https://bugs.ruby-lang.org/issues/6400#change-26452
Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
On NetBSD amd64, libffi with callback occurs SEGV as following.
kelvena% cat p
require 'dl/callback'
require 'dl/func'
include DL
Called_with = nil
addr = set_callback(TYPE_VOID, 1) do |str|
called_with = dlunwrap(str)
end
func = CFunc.new(addr, TYPE_VOID, 'test')
f = Function.new(func, [TYPE_VOIDP])
arg = 'foo'
f.call(dlwrap(arg))
kelvena% ./ruby p
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55: [BUG] Segmentation fault
ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :call
c:0004 p:0059 s:0018 b:0018 l:000017 d:000017 METHOD /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.
rb:55
c:0003 p:0157 s:0010 b:0010 l:001db8 d:0021a8 EVAL p:11
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001db8 d:001db8 TOP
-- Ruby level backtrace information ----------------------------------------
p:11:in `<main>'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
-- Other runtime information -----------------------------------------------
* Loaded script: p
* Loaded features:
0 enumerator.so
1 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/encdb.so
2 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/trans/transdb.so
3 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/defaults.rb
4 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/rbconfig.rb
5 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/deprecate.rb
6 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/exceptions.rb
7 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/custom_require.rb
8 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems.rb
9 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/dl.so
10 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/fiddle.so
11 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/function.rb
12 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/closure.rb
13 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle.rb
14 /home/naruse/local/ruby/lib/ruby/2.0.0/dl.rb
15 /home/naruse/local/ruby/lib/ruby/2.0.0/thread.rb
16 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/callback.rb
17 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/stack.rb
18 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/value.rb
19 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
zsh: abort (core dumped) ./ruby p
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:47626] [ruby-trunk - Bug #6400] dl/callback with fiddle occurs SEGV on NetBSD amd64
2012-05-04 12:33 [ruby-dev:45616] [ruby-trunk - Bug #6400][Assigned] dl/callback with fiddle occurs SEGV on NetBSD amd64 naruse (Yui NARUSE)
2012-05-04 14:10 ` [ruby-dev:45621] [ruby-trunk - Bug #6400] " naruse (Yui NARUSE)
@ 2013-08-14 20:06 ` zzak (Zachary Scott)
2019-10-22 17:07 ` [ruby-dev:50853] [Ruby master Bug#6400] " merch-redmine
2 siblings, 0 replies; 4+ messages in thread
From: zzak (Zachary Scott) @ 2013-08-14 20:06 UTC (permalink / raw)
To: ruby-dev
Issue #6400 has been updated by zzak (Zachary Scott).
Is this related to #6592?
----------------------------------------
Bug #6400: dl/callback with fiddle occurs SEGV on NetBSD amd64
https://bugs.ruby-lang.org/issues/6400#change-41158
Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
Backport:
On NetBSD amd64, libffi with callback occurs SEGV as following.
kelvena% cat p
require 'dl/callback'
require 'dl/func'
include DL
Called_with = nil
addr = set_callback(TYPE_VOID, 1) do |str|
called_with = dlunwrap(str)
end
func = CFunc.new(addr, TYPE_VOID, 'test')
f = Function.new(func, [TYPE_VOIDP])
arg = 'foo'
f.call(dlwrap(arg))
kelvena% ./ruby p
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55: [BUG] Segmentation fault
ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :call
c:0004 p:0059 s:0018 b:0018 l:000017 d:000017 METHOD /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.
rb:55
c:0003 p:0157 s:0010 b:0010 l:001db8 d:0021a8 EVAL p:11
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001db8 d:001db8 TOP
-- Ruby level backtrace information ----------------------------------------
p:11:in `<main>'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
-- Other runtime information -----------------------------------------------
* Loaded script: p
* Loaded features:
0 enumerator.so
1 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/encdb.so
2 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/trans/transdb.so
3 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/defaults.rb
4 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/rbconfig.rb
5 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/deprecate.rb
6 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/exceptions.rb
7 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/custom_require.rb
8 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems.rb
9 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/dl.so
10 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/fiddle.so
11 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/function.rb
12 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/closure.rb
13 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle.rb
14 /home/naruse/local/ruby/lib/ruby/2.0.0/dl.rb
15 /home/naruse/local/ruby/lib/ruby/2.0.0/thread.rb
16 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/callback.rb
17 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/stack.rb
18 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/value.rb
19 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
zsh: abort (core dumped) ./ruby p
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:50853] [Ruby master Bug#6400] dl/callback with fiddle occurs SEGV on NetBSD amd64
2012-05-04 12:33 [ruby-dev:45616] [ruby-trunk - Bug #6400][Assigned] dl/callback with fiddle occurs SEGV on NetBSD amd64 naruse (Yui NARUSE)
2012-05-04 14:10 ` [ruby-dev:45621] [ruby-trunk - Bug #6400] " naruse (Yui NARUSE)
2013-08-14 20:06 ` [ruby-dev:47626] " zzak (Zachary Scott)
@ 2019-10-22 17:07 ` merch-redmine
2 siblings, 0 replies; 4+ messages in thread
From: merch-redmine @ 2019-10-22 17:07 UTC (permalink / raw)
To: ruby-dev
Issue #6400 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Assigned to Closed
DL was removed in commit:07308c4d30b8c5260e5366c8eed2abf054d86fe7.
If this still occurs when using Fiddle directly, please submit a new bug report for that.
----------------------------------------
Bug #6400: dl/callback with fiddle occurs SEGV on NetBSD amd64
https://bugs.ruby-lang.org/issues/6400#change-82239
* Author: naruse (Yui NARUSE)
* Status: Closed
* Priority: Normal
* Assignee: tenderlovemaking (Aaron Patterson)
* Target version:
* ruby -v: ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
* Backport:
----------------------------------------
On NetBSD amd64, libffi with callback occurs SEGV as following.
kelvena% cat p
require 'dl/callback'
require 'dl/func'
include DL
Called_with = nil
addr = set_callback(TYPE_VOID, 1) do |str|
called_with = dlunwrap(str)
end
func = CFunc.new(addr, TYPE_VOID, 'test')
f = Function.new(func, [TYPE_VOIDP])
arg = 'foo'
f.call(dlwrap(arg))
kelvena% ./ruby p
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55: [BUG] Segmentation fault
ruby 2.0.0dev (2012-04-30 trunk 35500) [x86_64-netbsd6.99.5]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :call
c:0004 p:0059 s:0018 b:0018 l:000017 d:000017 METHOD /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.
rb:55
c:0003 p:0157 s:0010 b:0010 l:001db8 d:0021a8 EVAL p:11
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001db8 d:001db8 TOP
-- Ruby level backtrace information ----------------------------------------
p:11:in `<main>'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
/home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb:55:in `call'
-- Other runtime information -----------------------------------------------
* Loaded script: p
* Loaded features:
0 enumerator.so
1 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/encdb.so
2 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/enc/trans/transdb.so
3 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/defaults.rb
4 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/rbconfig.rb
5 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/deprecate.rb
6 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/exceptions.rb
7 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems/custom_require.rb
8 /home/naruse/local/ruby/lib/ruby/2.0.0/rubygems.rb
9 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/dl.so
10 /home/naruse/local/ruby/lib/ruby/2.0.0/x86_64-netbsd6.99.5/fiddle.so
11 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/function.rb
12 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle/closure.rb
13 /home/naruse/local/ruby/lib/ruby/2.0.0/fiddle.rb
14 /home/naruse/local/ruby/lib/ruby/2.0.0/dl.rb
15 /home/naruse/local/ruby/lib/ruby/2.0.0/thread.rb
16 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/callback.rb
17 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/stack.rb
18 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/value.rb
19 /home/naruse/local/ruby/lib/ruby/2.0.0/dl/func.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
zsh: abort (core dumped) ./ruby p
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-22 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-04 12:33 [ruby-dev:45616] [ruby-trunk - Bug #6400][Assigned] dl/callback with fiddle occurs SEGV on NetBSD amd64 naruse (Yui NARUSE)
2012-05-04 14:10 ` [ruby-dev:45621] [ruby-trunk - Bug #6400] " naruse (Yui NARUSE)
2013-08-14 20:06 ` [ruby-dev:47626] " zzak (Zachary Scott)
2019-10-22 17:07 ` [ruby-dev:50853] [Ruby master Bug#6400] " merch-redmine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).