#782: Segfault occurs with exception. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ $ cat test_exception.rb # "[ruby-dev:31407]" class C def inspect bar {} end def bar raise ensure end end C.new.foo }}} Result of Ruby 1.9.1: {{{ $ ruby test_exception.rb test_exception.rb:12:in `<main>': undefined method `foo' for #<C:0x00000100848560> (NoMethodError) }}} Result of MacRuby Trunk: {{{ $ macruby test_exception.rb zsh: segmentation fault macruby test_exception.rb }}} I referred to Ruby's http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby /ruby-dev/31407 . -- Ticket URL: <http://www.macruby.org/trac/ticket/782> MacRuby <http://macruby.org/>
#782: Segfault occurs with exception. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martinlagardette@…): So the problem here is that when `#foo` is called, `#inspect` is called for the error message, which calls `#bar`, which raises, which calls `#inspect`, which calls `#bar`, etc. I'd like to know how the ruby guys fixed this without just spouting stack overflow. -- Ticket URL: <http://www.macruby.org/trac/ticket/782#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby