[#39420] Marshal.load で例外発生時に Segmentation fault エラー — patamanta@...
金田有二と申します。
5 messages
2009/10/02
[#39421] exception from open-uri — Yusuke ENDOH <mame@...>
遠藤です。
5 messages
2009/10/03
[#39439] [Bug #2179] 1.9.2において block のスコープがおかしいときがある — 益隆 三村 <redmine@...>
Bug #2179: 1.9.2において block のスコープがおかしいときがある
4 messages
2009/10/06
[#39446] Is the maintainer discharging rule approved? and about matrix.rb — Yugui <yugui@...>
Yuguiです。
4 messages
2009/10/08
[#39451] getaddrinfo: Name or service not known (SocketError) in net/ftp — Tanaka Akira <akr@...>
boron で気がついたのですが、net/ftp で login のときに
4 messages
2009/10/09
[#39469] Re: getaddrinfo: Name or service not known (SocketError) in net/ftp
— Shugo Maeda <shugo@...>
2009/10/12
前田です。
[#39453] [BUG: trunk] GC mark bug — SASADA Koichi <ko1@...>
ささだです.
7 messages
2009/10/10
[#39501] [bug:trunk] invalid memory access in 100**900 — Tanaka Akira <akr@...>
以下のように、100**900 を計算すると変なところをアクセスするようです。
4 messages
2009/10/17
[#39506] [Bug:1.9] case 文の式が省略され when 節に配列展開があるときの挙動 — wanabe <s.wanabe@...>
ワナベと申します。
4 messages
2009/10/17
[#39533] [Bug #2263] typo in man/ruby.1 — Narihiro Nakamura <redmine@...>
Bug #2263: typo in man/ruby.1
11 messages
2009/10/24
[#39534] Re: [Bug #2263] typo in man/ruby.1
— Yusuke ENDOH <mame@...>
2009/10/24
遠藤です。
[#39548] [Bug #2291] Net::FTPでソケットをオープンする前にbinary=を呼び出すと落ちる — Akira Matsuda <redmine@...>
Bug #2291: Net::FTPでソケットをオープンする前にbinary=を呼び出すと落ちる
10 messages
2009/10/27
[#39578] [Bug #2308] セーフレベル1の場合、Net::IMAPでSecurityErrorが発生する — Nozomu Kurasawa <redmine@...>
Bug #2308: セーフレベル1の場合、Net::IMAPでSecurityErrorが発生する
5 messages
2009/10/30
[#39579] [Bug #2310] should ensure GVL_UNLOCK_END in rb_thread_blocking_region — _ wanabe <redmine@...>
Bug #2310: should ensure GVL_UNLOCK_END in rb_thread_blocking_region
4 messages
2009/10/30
[#39584] Re: [ruby-cvs:32774] Ruby:r25556 (trunk): * array.c (rb_ary_to_ary): do not use #respond_to? to detect — Nobuyoshi Nakada <nobu@...>
なかだです。
6 messages
2009/10/30
[#39585] Re: [ruby-cvs:32774] Ruby:r25556 (trunk): * array.c (rb_ary_to_ary): do not use #respond_to? to detect
— Yukihiro Matsumoto <matz@...>
2009/10/30
まつもと ゆきひろです
[#39589] Re: [ruby-cvs:32774] Ruby:r25556 (trunk): * array.c (rb_ary_to_ary): do not use #respond_to? to detect
— Yukihiro Matsumoto <matz@...>
2009/10/30
まつもと ゆきひろです
[#39591] Re: [ruby-cvs:32774] Ruby:r25556 (trunk): * array.c (rb_ary_to_ary): do not use #respond_to? to detect
— Nobuyoshi Nakada <nobu@...>
2009/10/30
なかだです。
[#39592] infinite recursive call to C function — Yusuke ENDOH <mame@...>
遠藤です。
17 messages
2009/10/30
[#39596] Re: infinite recursive call to C function
— Yukihiro Matsumoto <matz@...>
2009/10/30
まつもと ゆきひろです
[#39599] Re: infinite recursive call to C function
— Nobuyoshi Nakada <nobu@...>
2009/11/02
なかだです。
[#39601] Re: infinite recursive call to C function
— Yukihiro Matsumoto <matz@...>
2009/11/02
まつもと ゆきひろです
[#39602] Re: infinite recursive call to C function
— Nobuyoshi Nakada <nobu@...>
2009/11/02
なかだです。
[#39603] Re: infinite recursive call to C function
— Yukihiro Matsumoto <matz@...>
2009/11/02
まつもと ゆきひろです
[#39605] Re: infinite recursive call to C function
— Nobuyoshi Nakada <nobu@...>
2009/11/02
なかだです。
[#39608] Re: infinite recursive call to C function
— Yukihiro Matsumoto <matz@...>
2009/11/02
まつもと ゆきひろです
[#39609] Re: infinite recursive call to C function
— Nobuyoshi Nakada <nobu@...>
2009/11/02
なかだです。
[#39610] Re: infinite recursive call to C function
— Yukihiro Matsumoto <matz@...>
2009/11/02
まつもと ゆきひろです
[ruby-dev:39424] [BUG:1.8.7] Fwd: Marshal.load で例外発生時に Segmentation fault エラー
From:
Yugui <yugui@...>
Date:
2009-10-03 09:20:15 UTC
List:
ruby-dev #39424
Redmineに認識させるために再転送します。
こうしないと既に流れたメールをredmineに登録できない問題は私に暇ができたら直します。
---------- 転送メッセージ ----------
From: <patamanta@mail.goo.ne.jp>
日付: 2009年10月3日3:29
件名: [ruby-dev:39420] Marshal.load で例外発生時に Segmentation fault エラー
To: ruby developers list <ruby-dev@ruby-lang.org>
金田有二と申します。
次のコードで Segmentation fault が発生しましたので
ご報告させて頂きます。
---
#! /usr/local/bin/ruby
GC.stress = true
loop do
begin
f = File.open("d")
Marshal.load(f)
rescue
end
end
---
# dは空のファイルです。
ざっとソースをみたところ marshal.c の 1480 行目で r_byte 関数を呼び出して
864行目で rb_eof_error で例外を発生させたあたりでエラーとなっているようです。
おそらく、1478行目でスタック上の作成した arg.wrapper オブジェクトを
GCが発生した際に適切に mark できなかったようにみえます。
Rubyのバージョンはx86_64-linux 上の1.8.7でバックトレースは次のようになります。
i686-linux では発生しないようです。
$ ruby marshal_error.rb
marshal_error.rb:5: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
アボートしました (core dumped)
$ gdb /usr/local/bin/ruby core.13316
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
Reading symbols from /lib64/librt.so.1...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `ruby marshal_error.rb'.
Program terminated with signal 6, Aborted.
[New process 13316]
#0 0x0000003131030215 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003131030215 in raise () from /lib64/libc.so.6
#1 0x0000003131031cc0 in abort () from /lib64/libc.so.6
#2 0x0000000000499438 in rb_bug (fmt=0x4b5acd "Segmentation fault")
at error.c:213
#3 0x000000000047044a in sigsegv (sig=<value optimized out>) at signal.c:634
#4 <signal handler called>
#5 0x0000000000472d1b in st_foreach (table=0x2baa79483e70,
func=0x42de60 <mark_entry>, arg=
0)
at st.c:487
#6 0x000000000042df31 in mark_locations_array (x=0x7fff31686de8,
n=2008) at gc.c:684
#7 0x000000000042e106 in garbage_collect () at gc.c:1468
#8 0x000000000042eba7 in rb_newobj () at gc.c:436
#9 0x0000000000474499 in str_alloc (klass=7257920) at string.c:67
#10 0x0000000000474599 in str_new3 (klass=7257920, str=0) at string.c:143
#11 0x00000000004745e6 in rb_str_new3 (str=48011179162360) at string.c:157
#12 0x0000000000416501 in rb_eval (self=48011179299480, n=0x0) at eval.c:3865
#13 0x0000000000416e41 in rb_eval (self=48011179299480, n=<value
optimized out>) at eval.c:3
498
#14 0x0000000000415f3c in rb_eval (self=48011179299480, n=<value
optimized out>) at eval.c:3
698
#15 0x00000000004186bb in rb_eval (self=48011179299480, n=<value
optimized out>) at eval.c:3
319
#16 0x000000000041a2d5 in rb_yield_0 (val=6, self=48011179299480, klass=0,
flags=<value optimized out>, avalue=0) at eval.c:5090
#17 0x0000000000424fe7 in loop_i () at eval.c:5222
#18 0x0000000000410704 in rb_rescue2 (b_proc=0x424fd0 <loop_i>,
data1=0, r_proc=0, data2=0)
at eval.c:5486
#19 0x00000000004108e0 in rb_f_loop () at eval.c:5247
#20 0x000000000041b56a in rb_call0 (klass=48011179309360,
recv=48011179299480, id=4121, oid=
4121,
argc=0, argv=0x0, body=0x2baa79497b78, flags=<value optimized out>)
at eval.c:5917
#21 0x000000000041c278 in rb_call (klass=48011179309360,
recv=48011179299480, mid=4121, argc
=0,
argv=0x0, scope=1, self=48011179299480) at eval.c:6164
#22 0x0000000000416fec in rb_eval (self=<value optimized out>,
n=<value optimized out>)
at eval.c:3518
#23 0x0000000000418ff2 in rb_eval (self=48011179299480, n=<value
optimized out>) at eval.c:3
233
#24 0x0000000000427b89 in ruby_exec_internal () at eval.c:1652
#25 0x0000000000427bd5 in ruby_exec () at eval.c:1672
#26 0x0000000000427bff in ruby_run () at eval.c:1682
#27 0x000000000040ddc3 in main (argc=2, argv=0x7fff3168a048,
envp=<value optimized out>)
at main.c:48
--
--
Yuki Sonoda (Yugui)
yugui@yugui.jp
http://yugui.jp