Skip to content

Race condition in the shared memory implementation, missing sync in read_sm and write_sm #195

Description

@GREENRAT-K405

Currently, In the shared memory c++ implementation If the writer updates the simulation state while the reader is reading it, the reader might get corrupted data (half old state, half new state).

The write_SM function writes to the shared memory buffer using without acquiring a lock, which will let the read_sm function 'read' simultaneously when write_Sm is running 'write'. This should not happen, this will result in corrupted data to the reader.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions