[MacRuby] #861: Abort occurs when throws an exception within Signal handler.

MacRuby ruby-noreply at macosforge.org
Fri Aug 20 00:23:43 PDT 2010


#861: Abort occurs when throws an exception within Signal handler.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 cat t.rb
 begin
   Signal.trap(:INT) { raise "Interrupt" }
   Process.kill :INT, Process.pid
   sleep 1
 rescue => e
   p e
 end
 }}}

 Result of Ruby 1.9.1:
 {{{
 $ ruby t.rb
 #<RuntimeError: Interrupt>
 }}}

 Result of MacRuby Trunk:
 {{{
 $ DYLD_LIBRARY_PATH=. ./macruby -I./lib t.rb
 2010-08-20 16:22:32.883 macruby[88979:903] *** Terminating app due to
 uncaught exception 'RuntimeError', reason:
 '/Users/watson/src/MacRuby/t.rb:2:in `block': Interrupt (RuntimeError)
         from /Users/watson/src/MacRuby/t.rb:2:in `<main>'
 '
 *** Call stack at first throw:
 (
         0   CoreFoundation                      0x00007fff81865cc4
 __exceptionPreprocess + 180
         1   libobjc.A.dylib                     0x00007fff812050f3
 objc_exception_throw + 45
         2   libmacruby.1.9.2.dylib              0x00000001001535e5
 rb_vm_raise + 437
         3   libmacruby.1.9.2.dylib              0x00000001000400cb
 rb_f_raise + 43
         4   libmacruby.1.9.2.dylib              0x0000000100140c69
 rb_vm_dispatch + 6841
         5   ???                                 0x0000000103e00780 0x0 +
 4359980928
         6   ???                                 0x0000000103e00c5d 0x0 +
 4359982173
         7   libmacruby.1.9.2.dylib              0x0000000100142569
 rb_vm_block_eval + 1401
         8   libmacruby.1.9.2.dylib              0x0000000100140c69
 rb_vm_dispatch + 6841
         9   libmacruby.1.9.2.dylib              0x0000000100100c95
 rb_eval_cmd + 677
         10  libmacruby.1.9.2.dylib              0x00000001000bc62a
 sighandler + 266
         11  libSystem.B.dylib                   0x00007fff8158a35a
 _sigtramp + 26
         12  ???                                 0x0000000000000000 0x0 + 0
         13  libmacruby.1.9.2.dylib              0x0000000100140c69
 rb_vm_dispatch + 6841
         14  ???                                 0x0000000103e00780 0x0 +
 4359980928
         15  ???                                 0x0000000103e0023c 0x0 +
 4359979580
         16  libmacruby.1.9.2.dylib              0x000000010014dbb8
 rb_vm_run + 488
         17  libmacruby.1.9.2.dylib              0x000000010003f600
 ruby_run_node + 80
         18  macruby                             0x0000000100000d28 main +
 152
         19  macruby                             0x0000000100000c88 start +
 52
         20  ???                                 0x0000000000000003 0x0 + 3
 )
 terminate called after throwing an instance of 'NSException'
 zsh: abort      DYLD_LIBRARY_PATH=. ./macruby -I./lib t.rb
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/861>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list