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

test uv_barrier_t size in right block #4311

Merged
merged 1 commit into from
Feb 12, 2024
Merged

test uv_barrier_t size in right block #4311

merged 1 commit into from
Feb 12, 2024

Conversation

semarie
Copy link

@semarie semarie commented Feb 12, 2024

the local uv_barrier_t implementation is used: for AIX, OpenBSD and any system not defining PTHREAD_BARRIER_SERIAL_THREAD.

as the uv_barrier_t struct was modified and it isn't a pointer anymore, the check for uv_barrier_t size isn't right anymore for systems not using local uv_barrier_t implementation. so move the check inside the block implementing uv_barrier_t using pthread_barrier_t.

tested on OpenBSD, where the build failed due to the STATIC_ASSERT().

the local uv_barrier_t implementation is used: for AIX, OpenBSD and any system
not defining PTHREAD_BARRIER_SERIAL_THREAD.

as the uv_barrier_t struct was modified and it isn't a pointer anymore, the
check for uv_barrier_t size isn't right anymore for systems not using local
uv_barrier_t implementation. so move the check inside the block implementing
uv_barrier_t using pthread_barrier_t.

tested on OpenBSD, where the build failed due to the STATIC_ASSERT().
@semarie
Copy link
Author

semarie commented Feb 12, 2024

Problem found while working with libuv version used by julia (see JuliaLang#35)

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@bnoordhuis
Copy link
Member

@semarie can you target the v1.x branch? I assume you want your change to end up in a stable release.

@semarie
Copy link
Author

semarie commented Feb 12, 2024

the v1.x branch doesn't trigger the problem (but it might be only by chance) as the implementation of uv_barrier_t is a pointer, as pthread_barrier_t on OpenBSD.

@bnoordhuis
Copy link
Member

Alright. Merging then.

@bnoordhuis bnoordhuis merged commit 76f7fb2 into libuv:master Feb 12, 2024
35 of 37 checks passed
@semarie semarie deleted the uv_barrier_t-internal-upstream branch February 12, 2024 09:23
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.

None yet

2 participants