-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ucontext usage update on macos 64 bits. #2817
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
ed28db1
to
15a88f3
Compare
src/unix/bsd/apple/b64/mod.rs
Outdated
@@ -109,6 +109,9 @@ extern "C" { | |||
path2: *const ::c_char, | |||
options: ::c_uint, | |||
) -> ::c_int; | |||
|
|||
#[allow(deprecated)] |
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.
Why is this attribute needed?
libc-test/build.rs
Outdated
// deprecated api | ||
"getcontext" => true, |
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.
I'm not sure if adding a deprecated API is a good idea. If there are no good alternatives, users should report it upstream, adding it here just delays the problem.
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.
I hesitated to be honest.
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.
There isn't any good alternative afaik, and I'm not sure if Apple cares about low-level APIs enough to provide one
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.
My concern is that deprecated items are likely to be removed, i.e. they would introduce a breaking change. Such a code should belong to userland IMHO.
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.
@devnexen By the way, we don't have to ignore it on the test anymore, right?
15a88f3
to
0e2e142
Compare
0e2e142
to
2d11246
Compare
Thanks! |
📌 Commit 2d11246 has been approved by |
ucontext usage update on macos 64 bits. closes #2812
💔 Test failed - checks-actions |
crates.io failure @bors retry |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
This commit effectively reverts #2817. Currently `ucontext_t` has both the wrong size and the wrong alignment for aarch64-apple-darwin which causes problems for users referencing the structure [1]. The issue linked from #2817 claimed that it fixed #2812 but that's still an issue where FFI warnings are still emitted for usage of `ucontext_t` due to its transitive usage of `u128`. I'm not sure how to fix #2812 myself, but given that #2817 doesn't appear to solve its original intent and additionally the size/align are currently wrong this commit reverts in the meantime. [1]: bytecodealliance/wasmtime#6785 (comment)
…ohnTitor Fix size/align of `ucontext_t` on aarch64-apple-darwin This commit effectively reverts #2817. Currently `ucontext_t` has both the wrong size and the wrong alignment for aarch64-apple-darwin which causes problems for users referencing the structure [1]. The issue linked from #2817 claimed that it fixed #2812 but that's still an issue where FFI warnings are still emitted for usage of `ucontext_t` due to its transitive usage of `u128`. I'm not sure how to fix #2812 myself, but given that #2817 doesn't appear to solve its original intent and additionally the size/align are currently wrong this commit reverts in the meantime. [1]: bytecodealliance/wasmtime#6785 (comment)
…ohnTitor Fix size/align of `ucontext_t` on aarch64-apple-darwin This commit effectively reverts #2817. Currently `ucontext_t` has both the wrong size and the wrong alignment for aarch64-apple-darwin which causes problems for users referencing the structure [1]. The issue linked from #2817 claimed that it fixed #2812 but that's still an issue where FFI warnings are still emitted for usage of `ucontext_t` due to its transitive usage of `u128`. I'm not sure how to fix #2812 myself, but given that #2817 doesn't appear to solve its original intent and additionally the size/align are currently wrong this commit reverts in the meantime. [1]: bytecodealliance/wasmtime#6785 (comment)
This commit effectively reverts rust-lang#2817. Currently `ucontext_t` has both the wrong size and the wrong alignment for aarch64-apple-darwin which causes problems for users referencing the structure [1]. The issue linked from rust-lang#2817 claimed that it fixed rust-lang#2812 but that's still an issue where FFI warnings are still emitted for usage of `ucontext_t` due to its transitive usage of `u128`. I'm not sure how to fix rust-lang#2812 myself, but given that rust-lang#2817 doesn't appear to solve its original intent and additionally the size/align are currently wrong this commit reverts in the meantime. [1]: bytecodealliance/wasmtime#6785 (comment)
closes #2812