[#21338] $SAFE=4 での autoload — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

21 messages 2003/09/04
[#21346] Re: $SAFE=4 での autoload — nobu.nakada@... 2003/09/04

なかだです。

[#21359] Re: $SAFE=4 での autoload — Hidetoshi NAGAI <nagai@...> 2003/09/05

永井@知能.九工大です.

[#21419] Makefile.inのlex.c — Kazuhiro NISHIYAMA <zn@...>

西山和広です。

15 messages 2003/09/28

[ruby-dev:21428] SEGV on fork with thread.

From: Tanaka Akira <akr@...17n.org>
Date: 2003-09-29 01:46:10 UTC
List: ruby-dev #21428
% ruby -ve '
Thread.new { sleep }
fork { p 1 }
Process.wait
p $?, $?.coredump?
'
ruby 1.8.0 (2003-09-27) [i686-linux]
139
true
% 

というように、SEGV して core を吐きます。
(思うのですが、Process::Status#inspect はそういう情報を人間可読な形式
で出力したほうがよろしいんではないかと思います。)

% gdb =ruby core
GNU gdb 5.3-debian
Copyright 2002 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"...
Core was generated by `ruby -ve 
Thread.new { sleep }
fork { p 1 }
Process.wait
p $?, $?.coredump?
'.
Program terminated with signal 11, Segmentation fault.
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  0x400e527f in strlen () from /lib/libc.so.6
(gdb) where
#0  0x400e527f in strlen () from /lib/libc.so.6
#1  0x00000002 in ?? ()
#2  0x400b84b3 in vfprintf () from /lib/libc.so.6
#3  0x400d6a62 in vsnprintf () from /lib/libc.so.6
#4  0x080c3284 in err_snprintf (buf=0xbfffab68 "-e:3: warning: fork terminates thread at -e:", len=8192, 
    fmt=0xbfffcba8 "warning: fork terminates thread at %s:%s", args=0xbfffebb4) at error.c:57
#5  0x080c3336 in warn_print (fmt=0xbfffcba8 "warning: fork terminates thread at %s:%s", args=0xbfffebb4) at error.c:116
#6  0x080c3399 in rb_warn (fmt=0x80c75e0 "fork terminates thread at %s:%s") at error.c:139
#7  0x080651c2 in rb_thread_atfork () at eval.c:9905
#8  0x08093b87 in rb_f_fork (obj=1075632736) at process.c:793
#9  0x0805b741 in rb_call0 (klass=1075637416, recv=1075632736, id=5009, oid=5009, argc=0, argv=0x0, body=0x401c1670, 
    nosuper=0) at eval.c:4793
#10 0x0805c166 in rb_call (klass=1075637416, recv=1075632736, mid=5009, argc=0, argv=0x0, scope=1) at eval.c:5136
#11 0x080572bc in rb_eval (self=1075632736, n=0x401be380) at eval.c:2986
#12 0x0805634c in rb_eval (self=1075632736, n=0x401be358) at eval.c:2710
#13 0x08053400 in eval_node (self=1075632736, node=0x401be358) at eval.c:1204
#14 0x080538b6 in ruby_exec () at eval.c:1369
#15 0x0805390d in ruby_run () at eval.c:1390
#16 0x08051e06 in main (argc=3, argv=0xbffff954, envp=0xbffff964) at main.c:50
(gdb) 
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread

Prev Next