From da3fa4f6a934cb1cf7a89bf0589c8de4431cf925 Mon Sep 17 00:00:00 2001 From: zhykzhykzhyk Date: Mon, 5 Jan 2026 01:13:10 +0800 Subject: [PATCH] Ensure manage_exception_state uses correct TLS Solves #323 --- include/boost/context/fiber_fcontext.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/context/fiber_fcontext.hpp b/include/boost/context/fiber_fcontext.hpp index 2c91b110..543ba6cf 100644 --- a/include/boost/context/fiber_fcontext.hpp +++ b/include/boost/context/fiber_fcontext.hpp @@ -87,10 +87,10 @@ struct __cxa_eh_globals { class manage_exception_state { public: - manage_exception_state() { + BOOST_NOINLINE manage_exception_state() { exception_state_ = *__cxa_get_globals(); } - ~manage_exception_state() { + BOOST_NOINLINE ~manage_exception_state() { *__cxa_get_globals() = exception_state_; } private: