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

Wrong memory order in fence synchronization in 'UniqueIndexSet' #120

Open
elBoberido opened this issue Feb 18, 2024 · 0 comments
Open

Wrong memory order in fence synchronization in 'UniqueIndexSet' #120

elBoberido opened this issue Feb 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@elBoberido
Copy link
Member

Required information

Operating system:
all

Rust version:
all

Cargo version:
all

iceoryx2 version:
main branch

Observed result or behaviour:

The UniqueIndexSet uses fences to synchronize next_free_index. The memory order of the fences is wrong and needs to be changed. It needs to be Ordering::Release in acquire_raw_index and Ordering::Acquire in release_raw_index.

Expected result or behaviour:

Proper ordering for the fences.

Conditions where it occurred / Performed steps:

If the index is send to another thread via a relaxed atomic operation, a reordering can happen.

@elBoberido elBoberido added the bug Something isn't working label Feb 18, 2024
@elBoberido elBoberido added this to the lock-free hardening milestone Feb 18, 2024
@elBoberido elBoberido self-assigned this Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant