Problems with GC.. again

Hi.

Again, I ran into some kind of wrongly garbage collected object, but
can’t determine exactly which one.

Sources is at:
http://files.whitequark.ru/rlua.tgz

Try:
ruby1.9 extconf.rb
make
ruby1.9 test.rb

A segfault!
----%<----
test.rb:21: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

– control frame ----------
c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :method_missing
c:0003 p:0099 s:0011 b:0009 l:001d58 d:001d58 TOP test.rb:21
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
:private_class_method
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :16

DBG> : “test.rb:21:in method_missing'" DBG> : "test.rb:21:in '”
– backtrace of native function call (Use addr2line) –
0xb7eefc46
0xb7e193a9
0xb7e1941a
0xb7ea0a56
0xb7f6340c
0xb7eda91e
0xb7eda980
0xb7ee7b07
0xb7eead9d
0xb7f5d300
0xb79b5912
0xb79b5d66
0xb79be502
0xb79b1a2e
0xb7f5cde6
0xb7f5d14f
0xb7edbc30
0xb7ee7dbd
0xb7ee848e
0xb7ee8546
0xb7eded81
0xb7ee08b4
0xb7ee6a84
0xb7ee6cad
0xb7e1bbd7
0xb7e1d156
0x8048794
0xb7c0c775
0x8048681
----%<----

WBR, Peter Z.

P. S. Can someone show me how does addr2line work? It doesn’t show
anything other than “??” with /usr/bin/ruby1.9,
/usr/lib/libruby1.9.so, ./rlua.so… May this be because Debian
binaries are stripped?

Hi,

At Tue, 31 Mar 2009 07:15:04 +0900,
Peter Z. wrote in [ruby-talk:332540]:

test.rb:21: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

Why do you use such old, unreleased revision?

Quoting “Nobuyoshi N.” [email protected]:

Hi,

At Tue, 31 Mar 2009 07:15:04 +0900,
Peter Z. wrote in [ruby-talk:332540]:

test.rb:21: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

Why do you use such old, unreleased revision?

It’s latest 1.9 packaged in Debian.

WBR, Peter Z.

On Mar 31, 2009, at 23:51 , Peter Z. wrote:

It’s latest 1.9 packaged in Debian.

sigh

Debian maintainers really seem to have it out for ruby… yet another
example.

Hi,

At Wed, 1 Apr 2009 15:51:28 +0900,
Peter Z. wrote in [ruby-talk:332638]:

test.rb:21: [BUG] Segmentation fault
ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

Why do you use such old, unreleased revision?

It’s latest 1.9 packaged in Debian.

Well, your code doesn’t segfault with 1.9.1p0 anyway.

$ ./ruby ext/rlua/test.rb
ruby 1.9.1p0 (2009-03-04 revision 22762) [i386-darwin9.6.0]
ext/rlua/test.rb:9:in define_finalizer': cannot define finalizer for Fixnum (ArgumentError) from ext/rlua/test.rb:9:ininitialize’
from ext/rlua/test.rb:9:in new' from ext/rlua/test.rb:9:inmethod_missing’
from ext/rlua/test.rb:9:in `’

On Wed, 01 Apr 2009 01:51:28 -0500, Peter Z. wrote:

It’s latest 1.9 packaged in Debian.

WBR, Peter Z.

Get the latest version from experimental.

–Ken