fiber: fix use-after-free on shutdown with lingering fiber join
On Tarantool shutdown we destroy all the fibers in some sequence. We don't require that all the fibers are finished before shutdown. So it may turn out that we first destroy some alive fiber and then destroy another alive fiber which joins the first one. Currently we have use-after-free issue in this case because clearing `link` field of the second fiber changes `wake` field of the first fiber. Close #9406 NO_DOC=bugfix (cherry picked from commit 2f7ec948)
Showing
- changelogs/unreleased/gh-9406-fix-use-after-free-on-shutdown.md 4 additions, 0 deletions...logs/unreleased/gh-9406-fix-use-after-free-on-shutdown.md
- src/lib/core/fiber.c 2 additions, 0 deletionssrc/lib/core/fiber.c
- test/app-luatest/fiber_test.lua 23 additions, 0 deletionstest/app-luatest/fiber_test.lua
Loading
Please register or sign in to comment