Issue #5139 has been updated by Tomoyuki Chikanaga.


(B) ??? -O3 ???確?????? r32749 ????????????????? r32748 ???????????????????????????????
??????????????(B) ??? -O3 ??????????? test-all ????????????????????????????????????????????????????
2011/05/01 ??? r31399 ????????????????????????????????????????????????????????????????????????????????????

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


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