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:
Oliver Kowalke 2019-03-14 15:03:28 +01:00
parent 0233d35081
commit e794cccf0e
2 changed files with 48 additions and 0 deletions

View File

@ -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();

View File

@ -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();