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

SigSet Incorrect implementation of Eq and PartialEq #1749

Closed
germag opened this issue Jun 21, 2022 · 5 comments · Fixed by #1946
Closed

SigSet Incorrect implementation of Eq and PartialEq #1749

germag opened this issue Jun 21, 2022 · 5 comments · Fixed by #1946
Labels

Comments

@germag
Copy link
Contributor

germag commented Jun 21, 2022

signal::SigSet derives Eq and PartialEq, I assume because libc::sigset_t does it too, but in linux, sigfillset(3) only initializes the first 64 bits, leaving the rest uninitialized, so two signal::SigSets can be different even though both have the same set of signals

@germag
Copy link
Contributor Author

germag commented Jun 21, 2022

I can work on fixing this, I assume it is preferable to manually implement PartialEq rather than simply eliminating the derive (Eq, PartialEq) since it's a breaking change, right?

@asomers
Copy link
Member

asomers commented Jun 21, 2022

Yes, I think it would be preferable to implement PartialEq rather than not to.

@magicant
Copy link
Contributor

FYI: I previously reported this to libc
rust-lang/libc#2700

@asomers asomers added the A-bug label Dec 4, 2022
@asomers
Copy link
Member

asomers commented Dec 4, 2022

@germag are you still planning to fix this?

@germag
Copy link
Contributor Author

germag commented Dec 19, 2022

@germag are you still planning to fix this?

Yes, sorry @asomers I thought it had been solved in the libc crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants