Skip to content
Snippets Groups Projects
Commit cdbddaff authored by Florian Fischer's avatar Florian Fischer
Browse files

fix lockless io-stealing

The uninitialized continuation pointer may be returned without being
written resulting in dispatching a not valid 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*.
parent 7d341a2e
No related branches found
No related tags found
Loading
Checking pipeline status