]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
And another case for catch/throw 13251/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Sep 2023 13:22:36 +0000 (15:22 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Sep 2023 13:22:36 +0000 (15:22 +0200)
pdns/mtasker.cc

index a02f6bcc9ef2649b2b0d460e0dfcaf4909c65847..1579534718723afdc746c3347455037ad72c8946 100644 (file)
@@ -380,7 +380,13 @@ template<class Key, class Val, class Cmp>bool MTasker<Key,Val,Cmp>::schedule(con
         ttdindex.erase(i++);                  // removes the waitpoint
 
         notifyStackSwitch(d_threads[d_tid].startOfStack, d_stacksize);
-        pdns_swapcontext(d_kernel, *uc); // swaps back to the above point 'A'
+        try {
+          pdns_swapcontext(d_kernel, *uc); // swaps back to the above point 'A'
+        }
+        catch (...) {
+          notifyStackSwitchDone();
+          throw;
+        }
         notifyStackSwitchDone();
       }
       else if(i->ttd.tv_sec)