[#12164] patch for ext/gdbm — Koji Arai <JCA02266@...>

新井です。

24 messages 2001/02/04
[#12168] Re: patch for ext/gdbm — matz@... (Yukihiro Matsumoto) 2001/02/05

まつもと ゆきひろです

[#12176] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/05

新井です。

[#12179] Re: patch for ext/gdbm — matz@... (Yukihiro Matsumoto) 2001/02/06

まつもと ゆきひろです

[#12219] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/12

新井です。

[#12220] Re: patch for ext/gdbm — Koji Arai <JCA02266@...> 2001/02/12

新井です。

[#12256] set_trace_func — keiju@... (Keiju ISHITSUKA)

けいじゅ@日本ラショナルソフトウェアです.

15 messages 2001/02/17

[#12293] crash on proc without a block — Kenichi Komiya <kom@...1.accsnet.ne.jp>

15 messages 2001/02/25

[#12323] Re: [ruby-list:28364] class definition extension — "K.Kosako" <kosako@...>

ruby-listから移動しました。

13 messages 2001/02/28
[#12324] Re: [ruby-list:28364] class definition extension — matz@... (Yukihiro Matsumoto) 2001/02/28

まつもと ゆきひろです

[ruby-dev:12293] crash on proc without a block

From: Kenichi Komiya <kom@...1.accsnet.ne.jp>
Date: 2001-02-25 10:22:29 UTC
List: ruby-dev #12293
小宮です

irbを使っていて気付いたのですが、

  def foo
    binding
  end
  eval "proc{proc}.call", foo

がクラッシュします。  

$ ruby -e 'def foo; binding; end; eval "proc{proc}.call", foo'
(eval):1: [BUG] Segmentation fault
ruby 1.6.3 (2001-02-24) [i686-linux]
Aborted

$ gdb ruby
GNU gdb 19990928
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run -e 'def foo; binding; end; eval "proc{proc}.call", foo'
Starting program: /usr/local/bin/ruby -e 'def foo; binding; end; eval "proc{proc}.call", foo'

Program received signal SIGSEGV, Segmentation fault.
0x805d45f in proc_new (klass=1075215176) at eval.c:6186
6186	    *data = *ruby_block;
(gdb) bt
#0  0x805d45f in proc_new (klass=1075215176) at eval.c:6186
#1  0x805d564 in rb_f_lambda () at eval.c:6227
#2  0x8059216 in call_cfunc (func=0x805d550 <rb_f_lambda>, recv=1075264656, 
    len=0, argc=0, argv=0x0) at eval.c:4190
#3  0x8059721 in rb_call0 (klass=1075268756, recv=1075264656, id=8497, argc=0, 
    argv=0x0, body=0x40167a80, nosuper=1) at eval.c:4326
#4  0x8059e67 in rb_call (klass=1075268756, recv=1075264656, mid=8497, argc=0, 
    argv=0x0, scope=2) at eval.c:4526
#5  0x80552cc in rb_eval (self=1075264656, n=0x40166acc) at eval.c:2530
#6  0x8057e53 in rb_yield_0 (val=6, self=1075264656, klass=0, acheck=2)
    at eval.c:3582
#7  0x805d7f4 in proc_call (proc=1075210836, args=6) at eval.c:6302
#8  0x80591f4 in call_cfunc (func=0x805d5b4 <proc_call>, recv=1075210836, 
    len=-2, argc=0, argv=0x0) at eval.c:4184
#9  0x8059721 in rb_call0 (klass=1075215176, recv=1075210836, id=5801, argc=0, 
    argv=0x0, body=0x40167af8, nosuper=1) at eval.c:4326
#10 0x8059e67 in rb_call (klass=1075215176, recv=1075210836, mid=5801, argc=0, 
    argv=0x0, scope=0) at eval.c:4526
#11 0x80552cc in rb_eval (self=1075264656, n=0x40166a7c) at eval.c:2530
#12 0x8051c98 in eval_node (self=1075264656, node=0x40166a7c) at eval.c:1077
#13 0x805a759 in eval (self=1075264656, src=1075211096, scope=1075211036, 
    file=0x80b34f5 "(eval)", line=1) at eval.c:4817
#14 0x805ab05 in rb_f_eval (argc=2, argv=0xbffff5a4, self=1075264656)
---Type <return> to continue, or q <return> to quit---
    at eval.c:4920
#15 0x8059208 in call_cfunc (func=0x805a998 <rb_f_eval>, recv=1075264656, 
    len=-1, argc=2, argv=0xbffff5a4) at eval.c:4187
#16 0x8059721 in rb_call0 (klass=1075268756, recv=1075264656, id=3649, argc=2, 
    argv=0xbffff5a4, body=0x401735d8, nosuper=1) at eval.c:4326
#17 0x8059e67 in rb_call (klass=1075268756, recv=1075264656, mid=3649, argc=2, 
    argv=0xbffff5a4, scope=1) at eval.c:4526
#18 0x80552cc in rb_eval (self=1075264656, n=0x40166b94) at eval.c:2530
#19 0x8051c98 in eval_node (self=1075264656, node=0x40166b94) at eval.c:1077
#20 0x8052031 in ruby_run () at eval.c:1207
#21 0x80508c6 in main (argc=3, argv=0xbffffc24, envp=0xbffffc34) at main.c:50
(gdb) frame 7
#7  0x805d7f4 in proc_call (proc=1075210836, args=6) at eval.c:6302
6302		result = rb_yield_0(args, 0, 0, Qtrue);
(gdb) p orphan
$1 = 1

この辺が怪しいと思うのですが・・・


小宮 健一

In This Thread

Prev Next