mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 15:14:01 +00:00
Don't crash on pthread_cancel
- in context of #28 Justinas V. Daugmaudis: This patch prevents abi::__forced_unwind from being eaten
This commit is contained in:
parent
0233d35081
commit
e794cccf0e
@ -59,6 +59,10 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -84,6 +88,10 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -207,6 +215,10 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -232,6 +244,10 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -331,6 +347,10 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -356,6 +376,10 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
|
@ -59,6 +59,10 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -86,6 +90,10 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -182,6 +190,10 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -209,6 +221,10 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -292,6 +308,10 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
@ -319,6 +339,10 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
|
||||
fn( synthesized);
|
||||
} catch ( boost::context::detail::forced_unwind const&) {
|
||||
throw;
|
||||
#if defined( BOOST_CONTEXT_HAS_CXXABI_H )
|
||||
} catch ( abi::__forced_unwind const&) {
|
||||
throw;
|
||||
#endif
|
||||
} catch (...) {
|
||||
// store other exceptions in exception-pointer
|
||||
except = std::current_exception();
|
||||
|
Loading…
x
Reference in New Issue
Block a user