-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
The manage_exception_state try to save and restore the exception state from/to the current thread that executing the fiber, but only one __cxa_get_globals() call is generated for the outer function after optimization, which would be incorrect if fiber resume on another thread.
context/include/boost/context/fiber_fcontext.hpp
Lines 88 to 98 in 6ff80e0
| class manage_exception_state { | |
| public: | |
| manage_exception_state() { | |
| exception_state_ = *__cxa_get_globals(); | |
| } | |
| ~manage_exception_state() { | |
| *__cxa_get_globals() = exception_state_; | |
| } | |
| private: | |
| __cxa_eh_globals exception_state_; | |
| }; |
// check disassembly of this function
void foo(boost::context::fiber&& f) { std::move(f).resume(); }Metadata
Metadata
Assignees
Labels
No labels