Hi,
In message "rb_protect and longjmp"
on 03/06/19, "Sean O'Dell" <sean / REMOVEME.celsoft.com> writes:
|Is rb_protect supposed to always return back to the caller? I'm wrapping
|calls in rb_protect wherever I can in my C++ application, but it seems that
|rb_protect doesn't always return.
|If I call rb_raise from inside rb_protect, longjmp seems to be getting
|called and I don't get a return from rb_protect. I also noticed that if I
|make certain "mistakes" such as pass an invalid value to rb_funcall where
|the object VALUE is expected, my application throws a system exception even
|though the rb_funcall was wrapped in rb_protect and rb_protect never
|returns.
rb_protect() should always return except for cases below:
* you throw your own exception, longjmp.
* you cause segmentation fault or bus error.
* you touch hidden bugs not found yet.
matz.