From: Adam Bozanich Date: 2007-05-07T12:34:07+09:00 Subject: Re: ruby packer prototype: core dumps ( design review request ) ------=_Part_47478_5012462.1178508844967 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/3/07, Nobuyoshi Nakada wrote: > > Hi, > > At Thu, 3 May 2007 15:30:14 +0900, > Adam Bozanich wrote in [ruby-core:11079]: > > Stepping through the debugger, the crash fails in rb_rescue2() in the > > JUMP_TAG() macro when prot_tag is dereferenced ( it is null ). > > rb_rescue2() reraises the caught exception if it isn't > handled. You may want to use rb_protect() instead. > > Thank you, that did the trick. I had overlooked the fact that rb_rescue() calls rb_rescue2() with rb_eStandardError rather than rb_eException. Strangely enough, when I use rb_protect(), there aren't any exceptions being thrown as far as I can tell. go figure. Thanks again, -Adam ------=_Part_47478_5012462.1178508844967 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/3/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
Hi,

At Thu, 3 May 2007 15:30:14 +0900,
Adam Bozanich wrote in [ruby-core:11079]:
> Stepping through the debugger, the crash fails in rb_rescue2() in the
> JUMP_TAG() macro when prot_tag is dereferenced ( it is null ).

rb_rescue2() reraises the caught exception if it isn't
handled.  You may want to use rb_protect() instead.


Thank you, that did the trick.  I had overlooked the fact that rb_rescue() calls rb_rescue2() with rb_eStandardError rather than rb_eException.  Strangely enough, when I use rb_protect(), there aren't any exceptions being thrown as far as I can tell.  go figure.

Thanks again,
-Adam
------=_Part_47478_5012462.1178508844967--