Closed vireshk closed 10 months ago
I don't know if it's a real bug or not, but if you want to keep the previous values, you can switch to bitflags 2.* and you shouldn't see the warning anymore.
Not for this PR, but I was looking at the code, and I'm a bit suspicious of:
/// Is standard Unix memory.
pub fn is_unix(&self) -> bool {
self.bits() == Self::UNIX.bits()
}
Can a Unix memory have NO_ADVANCE_MAP
flag set?
If it is the case is_unix()
will return false
, so we may need a mask there.
Not for this PR, but I was looking at the code, and I'm a bit suspicious of:
/// Is standard Unix memory. pub fn is_unix(&self) -> bool { self.bits() == Self::UNIX.bits() }
Can a Unix memory have
NO_ADVANCE_MAP
flag set? If it is the caseis_unix()
will returnfalse
, so we may need a mask there.
Unix can't have NO_ADVANCE_MAP
flag. Only Grant mapping can have that.
Unix can't have
NO_ADVANCE_MAP
flag. Only Grant mapping can have that.
Oh I see, I was confused by the negative flag!
Clippy gives this warning currently:
Fix it.
Summary of the PR
Please summarize here why the changes in this PR are needed.
Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.