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

yarv-dev:808

From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Sat, 4 Feb 2006 20:47:43 +0900
Subject: [yarv-dev:808] open> return in eval dumps core

こんばんは sheepman です。
次のようにすると core を吐きます。

$ cat t.rb
Thread.new{
  eval("return")
}.join

$ ./miniruby -v t.rb
ruby 1.9.0 (2005-11-18) [i686-linux]
YARVCore 0.3.3 (rev: 362) [opts: ]
DBG> : "t.rb:1:in `<main>'"
-- stack frame ------------
0x402b1008 (0000): 00000001
0x402b100c (0001): 00000004
0x402b1010 (0002): 40297bb8
0x402b1014 (0003): 40297b90
0x402b1018 (0004): 00000001 <- lfp <- dfp
-- control frame ----------
c:0004 p:-001 s:0005 b:0005 l:0004 d:0004 CFUNC  i:join     s:         -
c:0003 p:0019 s:0003 b:0003 l:-787 d:-787 TOP    i:<main>   s:
c:0002 p:-001 s:0001 b:0001 l:0000 d:0000 FINISH i:-        s:         -
c:0001 p:-001 s:0000 b:-001 l:0000 d:0000 ------ i:-        s:         -
---------------------------
[BUG] Segmentation fault
ruby 1.9.0 (2005-11-18) [i686-linux]

zsh: abort      ./miniruby -v t.rb

以下はバックトレースです。

(gdb) bt
#0  0x400ecc11 in kill () from /lib/i686/libc.so.6
#1  0x4002a341 in pthread_kill () from /lib/i686/libpthread.so.0
#2  0x4002a6bb in raise () from /lib/i686/libpthread.so.0
#3  0x400ec8a4 in raise () from /lib/i686/libc.so.6
#4  0x400ee008 in abort () from /lib/i686/libc.so.6
#5  0x080c944a in rb_bug (fmt=0x80f2651 "Segmentation fault") at ../yarv/error.c:173
#6  0x080a0a03 in sigsegv (sig=11) at ../yarv/signal.c:457
#7  0x4002ce8e in __pthread_clock_settime () from /lib/i686/libpthread.so.0
#8  0x400ec908 in killpg () from /lib/i686/libc.so.6
#9  0x08056ce3 in search_method (klass=1073937284, id=3221216940, klassp=0x0) at eval_method.h:165
#10 0x08056d27 in rb_get_method_body (klass=135536969, id=4833, idp=0xbfffe2a8)
    at eval_method.h:192
#11 0x0805a369 in rb_call (klass=135536969, recv=1076460152, mid=4833, argc=0, argv=0x0, scope=1)
    at ../yarv/eval.c:1617
#12 0x0805a68d in rb_funcall (recv=1076460152, mid=4833, n=0) at ruby.h:658
#13 0x08056130 in get_backtrace (info=1076460152) at eval_error.h:60
#14 0x0805945e in rb_longjmp (tag=6, mesg=1076460152) at ../yarv/eval.c:930
#15 0x08059664 in rb_exc_fatal (mesg=1076460152) at ../yarv/eval.c:975
#16 0x080bb2e4 in yarv_thread_value (self=135521128) at ../yarv/thread.c:261
#17 0x080b84db in call_cfunc (func=0x813e368, recv=25, len=1073937284, argc=134983756, argv=0x6)
    at call_cfunc.h:21
#18 0x080b661f in th_eval (th=0x813e368, initial=0) at insns.def:1340
#19 0x080b814d in th_eval_body (th=0x813e368) at ../yarv/vm.c:1274
#20 0x080b9478 in yarvcore_eval_iseq (iseq=1076460892) at yarv.h:49
#21 0x08058800 in ruby_exec_internal () at ../yarv/eval.c:269
#22 0x08058834 in ruby_exec () at ../yarv/eval.c:281
#23 0x0805886f in ruby_run () at ../yarv/eval.c:298
#24 0x08055f75 in main () at ../yarv/main.c:36
#25 0x400d9c1f in __libc_start_main () from /lib/i686/libc.so.6


-- 
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/

-- 
ML: yarv-dev quickml.atdot.net
使い方: http://www.atdot.net/~ko1/quickml

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

->     808 2006-02-04 20:47 [sheepman sheepman.sa] open> return in eval dumps core         
       894 2006-02-15 18:02 ┗[ko1 atdot.net       ] fixed> Re: open> return in eval dumps core