Skip to content
Snippets Groups Projects

fix lockless io-stealing

Merged Florian Fischer requested to merge aj46ezos/emper:fix-wait-free-io-stealing into master

The uninitialized continuation pointer may be returned without being written resulting in dispatching an invalid fiber pointer.

If a CQE is stolen but no fiber is blocked on the corresponding future IoContext::getContinuationsFromCompletions will call future->completeAndGetContinuation which will set the future's completion but will not return a continuation.

If no continuation is returned from Future::completeAndGetContinuation the continuation buffer is not advanced by IoContext::getContinuationsFromCompletions (emper/io/IoContext.hpp:259).

IoContext::reapSingleCompletion does not check if a continuation was created and assumed that continuation contains a valid Fiber* if a CQE was successfully stolen.

Initialize continuation with nullptr, which is a valid Fiber*.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
Please register or sign in to reply
Loading