Issue #5139 has been updated by Tomoyuki Chikanaga.


?????? trunk ??? RHEL4 ???2度??? SEGV ?????????????? backtrace() ??中????????? glibc ??????????????????????????????

(gdb) where
#0  0x0000003feff07f2c in _Unwind_FindEnclosingFunction ()
   from /lib64/libgcc_s.so.1
#1  0x0000003feff08e37 in _Unwind_Backtrace () from /lib64/libgcc_s.so.1
#2  0x0000003fed8db3df in backtrace () from /lib64/tls/libc.so.6
#3  0x0000000000531556 in rb_vm_bugreport () at ../ruby/vm_dump.c:40
#4  0x000000000057b866 in report_bug (file=Variable "file" is not available.
) at ../ruby/error.c:245
#5  0x0000203a313a652d in ?? ()
#6  0x0000000000000000 in ?? ()

?????????? r32815 ??????????????? altstack ??? init_head() ???確??????????????????????????????????
??????????????????????????????????????????????????????????????????????????解説???????????????????????
----------------------------------------
Bug #5139: sigsegv ???????????????????
http://redmine.ruby-lang.org/issues/5139

Author: Tomoyuki Chikanaga
Status: Closed
Priority: Normal
Assignee: Motohiro KOSAKI
Category: core
Target version: 1.9.3
ruby -v: -


???? 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