Skip to content

Off by one in MessageTask queue #17

@alltheblinkythings

Description

@alltheblinkythings

We pop garbage on the first call to MessageTask::PopMessage, and are always one behind when we pop.

To explain by example:

  • a newly created queue has _indexFront=0 and _indexBack=0.
  • the first call to MessageTask::SendAsyncMessage writes to offset 1 in the queue buffer (_indexBack + 1).
  • the first call to MessageTask::PopMessage reads from _indexFront, which points to offset 0 in the queue buffer.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions