Feature #3762
closedc++ exceptions result in segfault when raised in rb_thread_blocking_region callback
Description
=begin
http://gist.github.com/556829
This works under ruby1.9.1 but segfaults on 1.9.2 - any insights or suggestions would be much appreciated.
Thanks
=end
Updated by normalperson (Eric Wong) over 14 years ago
=begin
Bharanee Rathna redmine@ruby-lang.org wrote:
Backport #3762: c++ exceptions result in segfault when raised in rb_thread_blocking_region callback
http://redmine.ruby-lang.org/issues/show/3762Author: Bharanee Rathna
Status: Open, Priority: Normal
This works under ruby1.9.1 but segfaults on 1.9.2 - any insights or
suggestions would be much appreciated.
rb_thread_blocking_region in 1.9.1 is less robust and you can probably
get away with mistakes like this as a result.
Instead, you should catch inside blocking_function (or write a wrapper
function to catch and pass that wrapper to TBR instead).
--
Eric Wong
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Category set to ext
- Status changed from Open to Rejected
=begin
You can't break from blocking functions with C++ exception.
Ruby's exception mechanism which is implemented based on setjmp/longjmp is not compatible with C++'s one.
=end