-
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
WTERMSIG (and others) are unsafe on macOS, but safe on Linux #1888
Comments
It's not that I intentionally left macOS out, I just didn't go changing any other targets systematically in that first commit. Now that the infrastructure is in place, by all means we should update various other functions to use it, including on other targets. And yes, I'm not surprised that this resulted in "unused unsafe" warnings. We should prioritize adding this to matching functions for other targets, to avoid having problems where one target wants unsafe and another doesn't. |
773f556 should fix this on all platforms. The fix should be available in the next release of the libc crate. |
@joshtriplett @Thomasdezeeuw rustc's |
@xmo-odoo @joshtriplett did that in rust-lang/rust@16ebf75. |
Uh. Weird, I wonder what I fucked up that I apparently reached an outdated revision (through the github search according to my browser history, but now it links to an up-to-date one). Sorry about that. |
WTERMSIG
and related functions have been changed to no longer requireunsafe
, seemingly in commit 5a1df22. However on macOS these functions are stillunsafe
. See the definition on Linux https://docs.rs/libc/0.2.77/libc/fn.WTERMSIG.html (nounsafe
) vs. macOS https://docs.rs/libc/0.2.77/x86_64-apple-darwin/libc/fn.WTERMSIG.html (requiresunsafe
). Was it intentional to leave macOS out?Also this causes warnings, e.g. see https://github.com/rust-lang/rust/pull/76561/checks?check_run_id=1096958697#step:23:213 (https://github.com/rust-lang/rust/commit/7c3e1ffd7a945b4044e5e80d7d74ba944ff54d0f/checks/1096958697/logs).
/cc @joshtriplett who wrote the commit.
The text was updated successfully, but these errors were encountered: