-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
std.os: fix alignment of Sigaction.handler_fn #13418
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
Conversation
|
Hmm just realized that the existing test calls w/ |
|
Ok I namespaced the handler_called_count and made sure the test fully tests the |
e652829 to
d8b47ca
Compare
|
ci.ziglang fails in debug mode with Is there maybe some unformatted code? |
d8b47ca to
31ac4f9
Compare
* Should start failing on aarch64 and other word-aligned CPUs.
31ac4f9 to
bcaa439
Compare
|
Oops ya I thought I had my editor setup to run |
bcaa439 to
a68b27c
Compare
matu3ba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure though, if some align(1) are missing on some OSes.
fixes build of river see ziglang/zig#13418 ziglang/zig#13216
std.os: fix alignment of Sigaction.handler_fn
This fix (proposed independently by @Vexu here (#13216 (comment)) and @marler8997 here (marler8997/ziglibc#3 (comment)) allows one to pass
os.SIG.IGNor other non-pointer aligned values for thehandler_fnon word-aligned architectures like aarch64.The PR is two separate commits simply because this is my first PR to zig and I wanted to make sure that the CI picks up the failing case first and will be fixed w/ the 2nd commit, IMO the PR can be squashed before merging.
I added the
align(1)to all thelib/std/cimplementations, even the ones like dragonfly that only (currently) target x86 for consistency but am happy to remove those changes if preferred.Fixes #13216.