Skip to content

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

@GREENRAT-K405

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.

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