[ruby-dev:24213] 1.instance_eval "@@a" dumps core

From: Tanaka Akira <akr@...17n.org>
Date: 2004-09-03 09:40:57 UTC
List: ruby-dev #24213
次のように、1.instance_eval "@@a" とすると core を吐きます。

% ./ruby -e '1.instance_eval "@@a"'
(eval):1: [BUG] Segmentation fault
ruby 1.9.0 (2004-09-03) [i686-linux]

zsh: abort (core dumped)  ./ruby -e '1.instance_eval "@@a"'
% gdb ruby core 
GNU gdb 6.1-debian
Copyright 2004 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 "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `./ruby -e 1.instance_eval "@@a"'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x4009d721 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x4009d721 in kill () from /lib/libc.so.6
#1  0x4009d4c5 in raise () from /lib/libc.so.6
#2  0x4009e9e8 in abort () from /lib/libc.so.6
#3  0x080d0c06 in rb_bug (fmt=0x0) at error.c:214
#4  0x080af232 in sigsegv (sig=11) at signal.c:446
#5  <signal handler called>
#6  rb_cvar_get (klass=4, id=10302) at variable.c:1725
#7  0x08059bcf in rb_eval (self=3, n=0x4) at eval.c:3441
#8  0x0805f320 in eval (self=3, src=1075604880, scope=4, file=0x80dc013 "(eval)", line=1) at eval.c:6084
#9  0x0805f7d1 in eval_under_i (args=0x283e) at eval.c:6245
#10 0x0805f749 in exec_under (func=0x805f7a0 <eval_under_i>, under=4, cbase=4, args=0xbfffef00) at eval.c:6229
#11 0x0805f833 in eval_under (under=4, self=4, src=1075604880, file=0x4 <Address 0x4 out of bounds>, line=4) at eval.c:6267
#12 0x0805f986 in specific_eval (argc=1, argv=0xbffff1b8, klass=4, self=3) at eval.c:6321
#13 0x0805fa7a in rb_obj_instance_eval (argc=4, argv=0x4, self=3) at eval.c:6362
#14 0x08069eca in call_cfunc (func=0x805fa40 <rb_obj_instance_eval>, recv=3, len=10302, argc=0, argv=0xbffff1b8)
    at eval.c:5361
#15 0x0805e167 in rb_call0 (klass=1075674280, recv=3, id=4081, oid=4, argc=1, argv=0xbffff1b8, body=0x401d5ca0, nosuper=0)
    at eval.c:5501
#16 0x0805e418 in rb_call (klass=1075674280, recv=3, mid=4081, argc=1, argv=0xbffff1b8, scope=0) at eval.c:5722
#17 0x08059358 in rb_eval (self=1075669400, n=0x4) at ruby.h:634
#18 0x080558db in ruby_exec () at eval.c:1458
#19 0x08055920 in ruby_run () at eval.c:1479
#20 0x080539f5 in main (argc=4, argv=0x4, envp=0xbffff984) at main.c:38
(gdb) 
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread

Prev Next