iproto: fix crash if box.cfg listen is woken up.
There was access to previously freed memory in case when `cbus_call` is interrupted: `cbus_call_msg` in iproto allocates on stack, and if `cbus_call` failed due to fiber cancelation or wake up, `cbus_call_msg` memory is released. But function called through cbus is still work in iproto thread and there will be an attempt to access this memory when this function in iproto thread finished it's work. This patch rework this behaviour, now before `cbus_call` we reset FIBER_IS_CANCELLABLE flag, to prevent fiber cancellation or it's wake up. Closes #6480
Showing
- changelogs/unreleased/gh-6480-crash-if-box-cfg-listen-is-woken-up.md 3 additions, 0 deletions...unreleased/gh-6480-crash-if-box-cfg-listen-is-woken-up.md
- src/box/iproto.cc 19 additions, 13 deletionssrc/box/iproto.cc
- test/box/gh-6480-crash-if-box-cfg-listen-is-woken-up.result 25 additions, 0 deletionstest/box/gh-6480-crash-if-box-cfg-listen-is-woken-up.result
- test/box/gh-6480-crash-if-box-cfg-listen-is-woken-up.test.lua 10 additions, 0 deletions.../box/gh-6480-crash-if-box-cfg-listen-is-woken-up.test.lua
Loading
Please register or sign in to comment