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

fill_aligned_z: fix uninitialized atomic_int64_t #4279

Merged
merged 1 commit into from
May 27, 2024

Conversation

Icenowy
Copy link

@Icenowy Icenowy commented May 24, 2024

The behavior of atomic_int64_t's default constructor will leave it to an uninitialized state (accessing it will be undefined behavior).

Use 0 to explicitly initialize it because it will be soon compared and exchanged.

The behavior of atomic_int64_t's default constructor will leave it to an
uninitialized state (accessing it will be undefined behavior).

Use 0 to explicitly initialize it because it will be soon compared and
exchanged.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
@Icenowy Icenowy requested a review from supermerill as a code owner May 24, 2024 11:49
@supermerill supermerill merged commit 1d7a679 into supermerill:master May 27, 2024
supermerill pushed a commit that referenced this pull request May 28, 2024
The behavior of atomic_int64_t's default constructor will leave it to an
uninitialized state (accessing it will be undefined behavior).

Use 0 to explicitly initialize it because it will be soon compared and
exchanged.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
supermerill pushed a commit that referenced this pull request May 29, 2024
The behavior of atomic_int64_t's default constructor will leave it to an
uninitialized state (accessing it will be undefined behavior).

Use 0 to explicitly initialize it because it will be soon compared and
exchanged.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants