Issue #5139 has been updated by Tomoyuki Chikanaga.

Target version changed from 1.9.4 to 1.9.3

試???????????? 2??????????????

A) Ubuntu 10.04.03
$ uname -srvm
Linux 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:09:46 UTC 2011 i686
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /lib/libc.so.6 --version
GNU C Library (Ubuntu EGLIBC 2.11.1-0ubuntu7.8) stable release version 2.11.1, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.3.
Compiled on a Linux >>2.6.24-27-server<< system on 2011-01-21.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.

B) Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
$ uname -srvmp
Linux 2.6.9-89.ELlargesmp #1 SMP Mon Apr 20 10:43:12 EDT 2009 x86_64 x86_64
$ gcc-4.5 --version   # configure --with-gcc ??? gcc-4.5 ???????
gcc-4.5 (GCC) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /lib/libc.so.6 --version
GNU C Library stable release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.6 20060404 (Red Hat 3.4.6-10).
Compiled on a Linux 2.4.20 system on 2009-01-09.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        The C stubs add-on version 2.1.2.
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton
        GNU Libidn by Simon Josefsson
        libthread_db work sponsored by Alpha Processor Inc
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

???????????????????? -O0 ??? -O3 ????????????????????? -e 'Process.kill :SEGV, $$' ??????????????

(A)/-O0  => "[BUG]" ???表示????? SEGV
(A)/-O3  => "[BUG]" ???表示????? SEGV
(B)/-O0  => ?????????(???????表示????? abort ?????)
(B)/-O3  => "C level backtrace information" ???????????表示????? SEGV

???? (B) ??? ruby_1_9_3 ???????????? HEAD ??? -O3 ???????????????????????
(B)/-O3, 1.9.3 => "C level backtrace information" ???????????表示????? SEGV
??????????
??????????????????????????????????????????????? 1.9.3 ????????????????????????? 1.9.3 ??????????????????

??????空??????????????????????件???????????????????????????????????????以?????????
----------------------------------------
Bug #5139: sigsegv ???????????????????
http://redmine.ruby-lang.org/issues/5139

Author: Tomoyuki Chikanaga
Status: Assigned
Priority: Normal
Assignee: Motohiro KOSAKI
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.4dev (2011-08-01 trunk 32793) [i686-linux]


???? trunk ??? Linux ??? test_segv_test(TestRubyOptions) ??? Failure ????????????

$ ruby -e 'Process.kill :SEGV, $$'

????????????????????表示????????????????????????????? LOADED FEATURES ????????表示???????????????????????

???????????? r32751 ??????????????????????????????????????(Ubuntu 10.4, Kernel 2.6.32-33-generic, gcc 4.4.3) ????
?????????? sigsegv() ?????????????????? rb_vm_bugreport() ??? sigaltstack ??設??????????????????????????????
?????????????????????????????????????? SEGV ???????????????????????? 

以?? gdb ???????????
(gdb) run -e 'Process.kill 11, $$'
Program received signal SIGSEGV, Segmentation fault.
0x0012d422 in __kernel_vsyscall ()
(gdb) c
Continuing.
-e:1: [BUG] Segmentation fault
ruby 1.9.4dev (2011-08-01 trunk 32793) [i686-linux]
------------ snip -----------
* Loaded features:

Program received signal SIGSEGV, Segmentation fault.
0x08150864 in rb_vm_bugreport () at ../ruby/vm_dump.c:834
834             for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
(gdb) p ruby_current_thread->altstack
$5 = (void *) 0x8221ab8
(gdb) p $esp
$6 = (void *) 0x8220560
(gdb) p $esp - ruby_current_thread->altstack
$7 = -5464
(gdb) up
#1  0x08187095 in report_bug (file=0x82480b0 "-e", line=1,
    fmt=0x81c3bcb "Segmentation fault", args=0x8222714 "\263\063")
    at ../ruby/error.c:265
265             rb_vm_bugreport();
(gdb) p (char *)$esp - (char *)ruby_current_thread->altstack
$15 = -5144
(gdb) up
#2  0x08187121 in rb_bug (fmt=0x81c3bcb "Segmentation fault")
    at ../ruby/error.c:284
284         report_bug(file, line, fmt, args);
(gdb) p (char *)$esp - (char *)ruby_current_thread->altstack
$16 = 3112

$esp ??? ruby_current_thread->altstack ??????????????????????????????????????????????????????????????
???? sigaltstack ??渡?????????????????????? 4096 ???????





-- 
http://redmine.ruby-lang.org