2014-10-16 12:48 GMT+09:00 Eric Wong <normalperson / yhbt.net>:
>
> I was looking at test failures; I think [Bug #10389] is related
> (but I have not tried to translate).  So maybe these commits are
> unnecessary right now...

Yes.  [Bug #10389] is the root problem which cause recent test failures of
TestRubyOptions#test_segv_setproctitle
TestRubyOptions#test_segv_test and
TestBugReporter#test_bug_reporter_add.

Since SEGV occur in SEGV handler, the message is incomplete.
So the tests, which expect appropriate SEGV messages, fails.

  % ./miniruby -e 'Process.kill(:SEGV, $$)'
  -e:1: [BUG] Segmentation fault at 0x0003e800003ca3
  ruby 2.2.0dev (2014-10-16 trunk 47971) [x86_64-linux]

  -- Control frame information -----------------------------------------------
  c:0003 p:---- s:0009 e:000008 CFUNC  :kill
  c:0002 p:0015 s:0004 E:001730 EVAL   -e:1 [FINISH]
  c:0001 p:0000 s:0002 E:001d90 TOP    [FINISH]

  -- Ruby level backtrace information ----------------------------------------
  -e:1:in `<main>'
  zsh: segmentation fault  ./miniruby -e 'Process.kill(:SEGV, $$)'

> That said, I do not know why we need special-cases for signals to self.
> Seems like it can hide bugs for alternative Ruby implementations.

I think signals to self should be synchronous.

As far as I remember, Ruby 1.8 was synchronous.
Ruby 1.9 was asynchronous at beginning but we found sometimes the
synchronous behavior is useful.
So Ruby 1.9 was fixed the behavior.
-- 
Tanaka Akira