Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reactor: fix crash in pending registration task after poller dtor
A poller destructor that finds the poller still has a registration task cancels it (sets _p = nullptr), however the task remains on the task queue. The original commit (below) introduced deleting such registration task object right in ~poller(). Which means the reactor will pick this task from the task queue while the contents is stale: use after free. If we're lucky, _p will still read as nullptr, but otherwise run_and_dispose() will likely segfault. Fix: Removed deleting _registration_task: run_and_dispose() will do it. Fixes: bcb5cf3 Signed-off-by: Anton Eidelman <[email protected]> Closes #2571
- Loading branch information