]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/async: drop noexcept on io_context_pool threadfunc
authorIlya Dryomov <idryomov@gmail.com>
Wed, 4 Aug 2021 12:58:11 +0000 (14:58 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 7 Aug 2021 12:18:29 +0000 (14:18 +0200)
commitb2631ed3e3c4116e141dfb49f62a447e52632687
tree3cc3326611f3ef5fb5a4f7d0832dd8f3b4cd1497
parent1cb16e2fdab9b85009ec9f3498747c99495244b5
common/async: drop noexcept on io_context_pool threadfunc

This issue has been addressed in g++ 8: there is no try/catch in
execute_native_thread_routine() anymore [1][2] and noexcept ends up
having the opposite effect.  Whereas without noexcept g++ guarantees
that the stack would not be unwound [3], it doesn't make such guarantee
for the noexcept case.  According to the standard, these cases are
distinct and even though both are implementation defined, g++ only
defines the former.  With noexcept, it unwinds up to the noexcept frame
which is not useful at all.  (clang unwinds up to and including the
noexcept frame and only msvc does the right thing and immediately
terminates.)

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=754d67d5ba4a1f9994210d402893a4cf49ce6a71
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917
[3] https://gcc.gnu.org/onlinedocs/gcc/Exception-handling.html

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/common/async/context_pool.h