[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev:1076

From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Sun, 30 Jul 2006 20:00:30 +0900
Subject: [yarv-dev:1076] Re: open> at_exit and singleton class

こんばんは、sheepman です。
間違った gdb のバックトレースを張ってしまったので、
再投稿します。

$ cat t.rb
GC.stress = true

class X
  def X.def_call_one(s)
     s = class << self; self; end
  end
end

class C
  def C.def_mthd
    block = proc{ 1 }
    Class.funcall(:define_method, :one, &block)
  end

  def_mthd
end

X.def_call_one(C)

proc do
end

p X.one

$ ruby-2.0 -v t.rb
ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-linux]
YARVCore 0.4.1 Rev: 527 (2006-07-19) [opts: [direct threaded code] [inline method cache] ]
t.rb:23: -- stack frame ------------
0000 (0x402b3008): 00000004
0001 (0x402b300c): 00000005
0002 (0x402b3010): 00000004
0003 (0x402b3014): 40299948
0004 (0x402b3018): 402b12c8 <- bp
0005 (0x402b301c): 4029eefc
-- control frame ----------
c:0003 p:0073 s:0006 b:0004 l:0x258c d:0x258c TOP    t.rb:23
c:0002 p:---- s:0002 b:0002 l:000001 d:000001 FINISH
c:0001 p:---- s:0000 b:-001 l:000000 d:000000 ------
---------------------------
[BUG] Segmentation fault
ruby 2.0.0 (2006-04-08) [i686-linux]

zsh: abort (core dumped)  ruby-2.0 -v t.rb

(gdb) bt
#0  0x400eec11 in kill () from /lib/i686/libc.so.6
#1  0x4002c341 in pthread_kill () from /lib/i686/libpthread.so.0
#2  0x4002c6bb in raise () from /lib/i686/libpthread.so.0
#3  0x400ee8a4 in raise () from /lib/i686/libc.so.6
#4  0x400f0008 in abort () from /lib/i686/libc.so.6
#5  0x080d29be in rb_bug (fmt=0x80fc771 "Segmentation fault") at ../yarv/error.c:171
#6  0x0809f513 in sigsegv () at ../yarv/signal.c:471
#7  0x4002ee8e in __pthread_clock_settime () from /lib/i686/libpthread.so.0
#8  0x400ee908 in killpg () from /lib/i686/libc.so.6
#9  0x080b5b35 in th_invoke_proc (th=0x8148588, proc=0x8149438, self=1076489980, argc=0,
    argv=0x402b3020) at ../yarv/vm.c:701
#10 0x080bac4f in th_eval (th=0x8148588, initial=0) at ../yarv/vm.c:430
#11 0x080c0203 in th_eval_body (th=0x8148588) at ../yarv/vm.c:1469
#12 0x080c1dcb in yarv_th_eval (th=0x8148588, iseqval=1076465400) at ../yarv/yarvcore.c:446
#13 0x080c1864 in yarvcore_eval_iseq (iseq=1076465400) at ../yarv/yarvcore.c:175
#14 0x08058780 in ruby_exec_internal () at ../yarv/eval.c:233
#15 0x0805879c in ruby_exec () at ../yarv/eval.c:246
#16 0x080587d7 in ruby_run () at ../yarv/eval.c:266
#17 0x080562ec in th_get_ruby_level_cfp (th=0x0, cfp=0x6) at ../yarv/main.c:46
#18 0x400dbc1f in __libc_start_main () from /lib/i686/libc.so.6

-- 
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp

--
ML: yarv-dev quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

      1074 2006-07-30 17:00 [sheepman sheepman.sa] open> at_exit and singleton class       
      1075 2006-07-30 19:28 ┗[sheepman sheepman.sa]                                       
->    1076 2006-07-30 20:00  ┗[sheepman sheepman.sa]