-
Notifications
You must be signed in to change notification settings - Fork 13k
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
FileType
PartialEq
implementation is buggy on Unix
#104900
Labels
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Comments
@rustbot claim |
@rustbot label: +T-libs-api + Libs-Small |
@rustbot label: +T-libs-api +Libs-Small |
@rustbot label: +T-libs-api |
rustbot
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Nov 29, 2022
krtab
added a commit
to krtab/rust
that referenced
this issue
Nov 30, 2022
krtab
added a commit
to krtab/rust
that referenced
this issue
Dec 6, 2022
Commit 7700595 implemented masking of FileType to fix an issue[^1] in the semantic of FileType comparison. This commit introduces masking to Hash to maintain the invariant that x == y => hash(x) == hash(y). [^1]: rust-lang#104900
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Dec 10, 2022
Implement masking in FileType comparison on Unix Fixes: rust-lang#104900
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
May 31, 2023
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
May 31, 2023
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
May 31, 2023
Commit 77005950f09d2f9ba54962bf5adc3f2bc3a7213f implemented masking of FileType to fix an issue[^1] in the semantic of FileType comparison. This commit introduces masking to Hash to maintain the invariant that x == y => hash(x) == hash(y). [^1]: rust-lang/rust#104900
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this issue
May 31, 2023
Implement masking in FileType comparison on Unix Fixes: rust-lang/rust#104900
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I tried this code:
This currently fails, even though no symlinks are involved.
This is because
FileType
on Unix are currently compared on the totality of their contained unixst_mode
, which are bitflags of the form...YYY0XXX
(in octal) whereXXX
is a Unix permission mode and...YYY
the actual file type. As of now, depending on how theFileType
is built,XXX
may be either000
(fromDirEntry::filetype
) or set to the actual file permission mode (if built fromfs::metadata
).(This bug was co-investigated with @hernoufM)
The text was updated successfully, but these errors were encountered: