From c79564d0de69422ed33f2fbc892908ad510e6a19 Mon Sep 17 00:00:00 2001
From: Philipp Otterbein <potterbein@blockstream.com>
Date: Sat, 10 May 2025 03:27:05 +0200
Subject: [PATCH] restore exception state after destruction of fiber

---
 include/boost/context/fiber_fcontext.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/boost/context/fiber_fcontext.hpp b/include/boost/context/fiber_fcontext.hpp
index 4c5b6546..2c91b110 100644
--- a/include/boost/context/fiber_fcontext.hpp
+++ b/include/boost/context/fiber_fcontext.hpp
@@ -344,6 +344,8 @@ class fiber {
 
     ~fiber() {
         if ( BOOST_UNLIKELY( nullptr != fctx_) ) {
+            detail::manage_exception_state exstate;
+            boost::ignore_unused(exstate);
             detail::ontop_fcontext(
 #if defined(BOOST_NO_CXX14_STD_EXCHANGE)
                     detail::exchange( fctx_, nullptr),
