Bug #6237
closedruby my_controller.rbでSEGV
Description
以下のようにすると [BUG] となって落ちます。
~/rails3test/test32/app/controllers$ ~/rubies/trunk/bin/ruby-trunk my_controller.rb
my_controller.rb:1: [BUG] Segmentation fault
ruby 2.0.0dev (2012-03-31 trunk 30224) [i686-linux]
-- Control frame information -----------------------------------------------
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :kill
c:0003 p:0019 s:0006 b:0006 l:0008bc d:0002c4 EVAL my_controller.rb:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0008bc d:0008bc TOP
-- Ruby level backtrace information ----------------------------------------
my_controller.rb:1:in <main>' my_controller.rb:1:in
kill'
-- C level backtrace information -------------------------------------------
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x190e73) [0xb77dce73] ../vm_dump.c:812
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x58e47) [0xb76a4e47] vfscanf.c:1858
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(rb_bug+0x49) [0xb76a4f39] vfscanf.c:2674
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x116efc) [0xb7762efc] ../signal.c:600
[0xb786f40c]
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x17b3b0) [0xb77c73b0] ../vm_insnhelper.c:367
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x18f68d) [0xb77db68d] ../vm_insnhelper.c:454
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x17e721) [0xb77ca721] ../insns.def:1018
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x1849a1) [0xb77d09a1] ../vm.c:1223
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(rb_iseq_eval_main+0x1f7) [0xb77d0da7] ../vm.c:1463
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(+0x5adba) [0xb76a6dba] printf-parsemb.c:298
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(ruby_exec_node+0x25) [0xb76a6df5] fxprintf.c:32
/home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0(ruby_run_node+0x35) [0xb76a87d5] iofsetpos.c:40
/home/tadashi/rubies/trunk/bin/ruby-trunk() [0x80487b8] ../main.c:38
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7484ca6] libc-start.c:228
/home/tadashi/rubies/trunk/bin/ruby-trunk() [0x80486b1]
-- Other runtime information -----------------------------------------------
-
Loaded script: my_controller.rb
-
Loaded features:
0 enumerator.so
1 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/rubygems/defaults.rb
2 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/i686-linux/rbconfig.rb
3 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/rubygems/deprecate.rb
4 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/rubygems/exceptions.rb
5 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/rubygems/custom_require.rb
6 /home/tadashi/rubies/trunk/lib/ruby/2.0.0/rubygems.rb -
Process memory map:
08048000-08049000 r-xp 00000000 08:02 3434253 /home/tadashi/rubies/trunk/bin/ruby-trunk
08049000-0804a000 rw-p 00000000 08:02 3434253 /home/tadashi/rubies/trunk/bin/ruby-trunk
09ecb000-0a045000 rw-p 00000000 00:00 0 [heap]
b72ac000-b72c6000 r-xp 00000000 08:02 3801704 /usr/local/lib/libgcc_s.so.1
b72c6000-b72c7000 rw-p 00019000 08:02 3801704 /usr/local/lib/libgcc_s.so.1
b72df000-b72e0000 ---p 00000000 00:00 0
b72e0000-b7364000 rw-p 00000000 00:00 0
b7364000-b746c000 r--p 00000000 08:02 1441795 /usr/lib/locale/locale-archive
b746c000-b746e000 rw-p 00000000 00:00 0
b746e000-b75ae000 r-xp 00000000 08:02 3157585 /lib/i686/cmov/libc-2.11.3.so
b75ae000-b75af000 ---p 00140000 08:02 3157585 /lib/i686/cmov/libc-2.11.3.so
b75af000-b75b1000 r--p 00140000 08:02 3157585 /lib/i686/cmov/libc-2.11.3.so
b75b1000-b75b2000 rw-p 00142000 08:02 3157585 /lib/i686/cmov/libc-2.11.3.so
b75b2000-b75b5000 rw-p 00000000 00:00 0
b75b5000-b75d9000 r-xp 00000000 08:02 3157447 /lib/i686/cmov/libm-2.11.3.so
b75d9000-b75da000 r--p 00023000 08:02 3157447 /lib/i686/cmov/libm-2.11.3.so
b75da000-b75db000 rw-p 00024000 08:02 3157447 /lib/i686/cmov/libm-2.11.3.so
b75db000-b75e4000 r-xp 00000000 08:02 3157453 /lib/i686/cmov/libcrypt-2.11.3.so
b75e4000-b75e5000 r--p 00008000 08:02 3157453 /lib/i686/cmov/libcrypt-2.11.3.so
b75e5000-b75e6000 rw-p 00009000 08:02 3157453 /lib/i686/cmov/libcrypt-2.11.3.so
b75e6000-b760d000 rw-p 00000000 00:00 0
b760d000-b760f000 r-xp 00000000 08:02 3157445 /lib/i686/cmov/libdl-2.11.3.so
b760f000-b7610000 r--p 00001000 08:02 3157445 /lib/i686/cmov/libdl-2.11.3.so
b7610000-b7611000 rw-p 00002000 08:02 3157445 /lib/i686/cmov/libdl-2.11.3.so
b7611000-b7618000 r-xp 00000000 08:02 3157584 /lib/i686/cmov/librt-2.11.3.so
b7618000-b7619000 r--p 00006000 08:02 3157584 /lib/i686/cmov/librt-2.11.3.so
b7619000-b761a000 rw-p 00007000 08:02 3157584 /lib/i686/cmov/librt-2.11.3.so
b761a000-b761b000 rw-p 00000000 00:00 0
b761b000-b7630000 r-xp 00000000 08:02 3157463 /lib/i686/cmov/libpthread-2.11.3.so
b7630000-b7631000 r--p 00014000 08:02 3157463 /lib/i686/cmov/libpthread-2.11.3.so
b7631000-b7632000 rw-p 00015000 08:02 3157463 /lib/i686/cmov/libpthread-2.11.3.so
b7632000-b7634000 rw-p 00000000 00:00 0
b764b000-b764c000 rw-p 00000000 00:00 0
b764c000-b7859000 r-xp 00000000 08:02 3435786 /home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0.0
b7859000-b785e000 rw-p 0020d000 08:02 3435786 /home/tadashi/rubies/trunk/lib/libruby-trunk.so.2.0.0
b785e000-b786f000 rw-p 00000000 00:00 0
b786f000-b7870000 r-xp 00000000 00:00 0 [vdso]
b7870000-b788b000 r-xp 00000000 08:02 3157429 /lib/ld-2.11.3.so
b788b000-b788c000 r--p 0001b000 08:02 3157429 /lib/ld-2.11.3.so
b788c000-b788d000 rw-p 0001c000 08:02 3157429 /lib/ld-2.11.3.so
bfa21000-bfa36000 rw-p 00000000 00:00 0 [stack]
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
アボートしました
SEGVを防ぐパッチを添付します。サイズが大きくなっているのは、根本的な対処が必要となったためです。
あとそういえば、ついでに当該の.rbファイルも添付しておきます。
よろしくお願いします。
Files
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to tad (Tadashi Saito)
たしかにSEGVします。
ただし、このパッチでは make love に失敗するので愛が足りないようです。
Updated by mame (Yusuke Endoh) over 12 years ago
- Status changed from Assigned to Rejected
- Priority changed from 7 to 3
エイプリルフール終わり。
--
Yusuke Endoh mame@tsg.ne.jp