Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recieved software bus buffers must be treated as "const" #71

Closed
jphickey opened this issue Nov 30, 2021 · 0 comments · Fixed by #137
Closed

Recieved software bus buffers must be treated as "const" #71

jphickey opened this issue Nov 30, 2021 · 0 comments · Fixed by #137
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

The software bus is a broadcast mechanism and sends the same memory buffers to all subscribed applications/pipes. The intent is that the data buffer should be const but for backward compatibility reasons the API does not enforce this.

However, CF actively writes to and modifies its received buffers, basically treating it as its own temporary storage location. If this is combined in a system with another app that subscribes to CF traffic (e.g. Data store, DTN, or some other traffic monitor) then all other apps will see the same modifications to the data buffer, and this effectively creates a race condition / unpredictable behavior.

All received software bus buffers should be qualified as const in application code, and they should not be written to. Apps should create their own buffers for temporary storage.

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

Successfully merging a pull request may close this issue.

3 participants