From: Otto Moerbeek Date: Wed, 13 Sep 2023 12:20:15 +0000 (+0200) Subject: Also catch/throw in sendEvent() case X-Git-Tag: dnsdist-1.9.0-alpha1~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd922c2168062b54c43de97f8889551d7fa6b3d9;p=thirdparty%2Fpdns.git Also catch/throw in sendEvent() case --- diff --git a/pdns/mtasker.cc b/pdns/mtasker.cc index dd7ccc50bd..a02f6bcc9e 100644 --- a/pdns/mtasker.cc +++ b/pdns/mtasker.cc @@ -252,7 +252,13 @@ templateint MTaskercontext); d_waiters.erase(waiter); // removes the waitpoint notifyStackSwitch(d_threads[d_tid].startOfStack, d_stacksize); - pdns_swapcontext(d_kernel,*userspace); // swaps back to the above point 'A' + try { + pdns_swapcontext(d_kernel,*userspace); // swaps back to the above point 'A' + } + catch (...) { + notifyStackSwitchDone(); + throw; + } notifyStackSwitchDone(); return 1; }