[#31647] [Backport #3666] Backport of r26311 (Bug #2587) — Luis Lavena <redmine@...>

Backport #3666: Backport of r26311 (Bug #2587)

13 messages 2010/08/07

[#31666] [Bug #3677] unable to run certain gem binaries' in windows 7 — Roger Pack <redmine@...>

Bug #3677: unable to run certain gem binaries' in windows 7

10 messages 2010/08/10

[#31676] [Backport #3680] Splatting calls to_ary instead of to_a in some cases — Tomas Matousek <redmine@...>

Backport #3680: Splatting calls to_ary instead of to_a in some cases

10 messages 2010/08/11

[#31681] [Bug #3683] getgrnam on computer with NIS group (+)? — Rocky Bernstein <redmine@...>

Bug #3683: getgrnam on computer with NIS group (+)?

13 messages 2010/08/11

[#31843] Garbage Collection Question — Asher <asher@...>

This question is no doubt a function of my own lack of understanding, but I think that asking it will at least help some other folks see what's going on with the internals during garbage collection.

17 messages 2010/08/25
[#31861] Re: Garbage Collection Question — Roger Pack <rogerdpack2@...> 2010/08/26

> The question in short: when an object goes out of scope and has no

[#31862] Re: Garbage Collection Question — Asher <asher@...> 2010/08/26

Right - so how does a pointer ever get off the stack?

[#31873] Re: Garbage Collection Question — Kurt Stephens <ks@...> 2010/08/27

On 8/26/10 11:51 AM, Asher wrote:

[#31894] Re: Garbage Collection Question — Asher <asher@...> 2010/08/27

I very much appreciate the response, and this is helpful in describing the narrative, but it's still a few steps behind my question - but it may very well have clarified some points that help us get there.

[#31896] Re: Garbage Collection Question — Evan Phoenix <evan@...> 2010/08/27

You have introduced something called a "root node" without defining it. What do you mean by this?

[#31885] Avoiding $LOAD_PATH pollution — Eric Hodel <drbrain@...7.net>

Last year Nobu asked me to propose an API for adding an object to

21 messages 2010/08/27

[#31947] not use system for default encoding — Roger Pack <rogerdpack2@...>

It strikes me as a bit "scary" to use system locale settings to

19 messages 2010/08/30

[#31971] Change Ruby's License to BSDL + Ruby's dual license — "NARUSE, Yui" <naruse@...>

Ruby's License will change to BSDL + Ruby's dual license

16 messages 2010/08/31

[ruby-core:31892] [Bug #3752] ruby/dl and segmentation fault

From: Vincent Carmona <redmine@...>
Date: 2010-08-27 12:27:59 UTC
List: ruby-core #31892
Bug #3752: ruby/dl and segmentation fault
http://redmine.ruby-lang.org/issues/show/3752

Author: Vincent Carmona
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]

I am trying to port ruby-taglib to ruby 1.9
My current efforts can be dowload at http://rubyforge.org/frs/?group_id=5494 .

When I trying to access an unsupported format file (i.e. an empty file) I have an segmentation fault.
Here is a test case which work with the 1.8 serie (TagLib::BadFile is thrown).

require 'taglib'
begin
	tag=TagLib::File.new("/unsupported/format/file")
	p tag.title
rescue TagLib::BadFile
	p 'TagLib::BadFile'
ensure
	tag.close if tag
end

The segfault happens is the private method TagLib::File#tag when TagLib.taglib_file_tag is called.

The important steps are in ruby-taglib code are:
require 'dl'
require 'dl/import'
extend DL::Importer
dlload 'libtag_c.so'
extern 'void* taglib_file_tag(void*)'
@tag ||= TagLib.taglib_file_tag(@file)

See the full code (less than 250 lignes) for more info.

I think TagLib.taglib_file_tag returns nil on error with ruby 1.8.
Can this behavior be ported to ruby 1.9 ? A crash is not very handy.

Here is the trace :

/usr/lib/ruby/1.9.1/dl/func.rb:39: [BUG] Segmentation fault
ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]

-- control frame ----------
c:0008 p:---- s:0031 b:0031 l:000030 d:000030 CFUNC  :call
c:0007 p:0076 s:0027 b:0027 l:000026 d:000026 METHOD /usr/lib/ruby/1.9.1/dl/func.rb:39
c:0006 p:0019 s:0020 b:0020 l:000019 d:000019 METHOD (eval):2
c:0005 p:0027 s:0015 b:0015 l:000014 d:000014 METHOD /home/instable/Desktop/zik/dev/taglib.rb:227
c:0004 p:0018 s:0012 b:0011 l:000010 d:000010 METHOD /home/instable/Desktop/zik/dev/taglib.rb:153
c:0003 p:0048 s:0008 b:0007 l:0014e4 d:000618 EVAL   ./es.rb:9
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014e4 d:0014e4 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
/usr/lib/ruby/1.9.1/dl/func.rb:39:in `call'
/usr/lib/ruby/1.9.1/dl/func.rb:39:in `call'
(eval):2:in `taglib_file_tag'
/home/instable/Desktop/zik/dev/taglib.rb:227:in `tag'
/home/instable/Desktop/zik/dev/taglib.rb:153:in `title'
./es.rb:9:in `<main>'

-- C level backtrace information -------------------------------------------
0xb76dc929 /usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x69) [0xb76dc929]
0xb75f592f /usr/lib/libruby-1.9.1.so.1.9(+0x4692f) [0xb75f592f]
0xb75f59ca /usr/lib/libruby-1.9.1.so.1.9(rb_bug+0x3a) [0xb75f59ca]
0xb76829c4 /usr/lib/libruby-1.9.1.so.1.9(+0xd39c4) [0xb76829c4]
0xb7751410 [0xb7751410]
0xb71c7fa0 /usr/lib/ruby/1.9.1/i486-linux/dl.so(rb_dlcfunc_call+0x5cc0) [0xb71c7fa0]
0xb76c9af3 /usr/lib/libruby-1.9.1.so.1.9(+0x11aaf3) [0xb76c9af3]
0xb76c9e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb76c9e84]
0xb76d617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb76d617c]
0xb76d0673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb76d0673]
0xb76d3b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb76d3b46]
0xb76d3dbb /usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xab) [0xb76d3dbb]
0xb75f7c77 /usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0xb7) [0xb75f7c77]
0xb75f9276 /usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x56) [0xb75f9276]
0x80487c8 ruby1.9.1(main+0x68) [0x80487c8]
0xb73ecbd6 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb73ecbd6]
0x80486c1 ruby1.9.1() [0x80486c1]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abandon


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next