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

Use mem::zeroed instead of mem::uninitialized to create libc::sigaction and others. #4

Open
5225225 opened this issue Jul 31, 2022 · 0 comments

Comments

@5225225
Copy link

5225225 commented Jul 31, 2022

Hello! As part of rust-lang/rust#99389 I'm going through crates that run into stricter checks that are being added, and this crate runs into them.

In signal.rs, the uninitialized::<libc::sigaction>() should use mem::zeroed or MaybeUninit, or directly constructing the struct. Not sure what you want to do, but uninitialized is UB.

Anywhere else that uninitialized is being used is also UB, but might not panic just yet, but might in the future.

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

No branches or pull requests

1 participant