Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set MAP_FIXED when addr isn't NULL and don't assume that shmflg != 0 means SHM_RDONLY
termux/proot-distro#495
QEMU implies use of
SHM_REMAP
: https://github.com/qemu/qemu/blob/495de0fd82d8bb2d7035f82d9869cfeb48de2f9e/linux-user/mmap.c#L1420-L1423In Linux,
addr != 0
impliesMAP_FIXED
, whileSHM_REMAP
flag only requires use ofaddr != 0
: https://github.com/torvalds/linux/blob/7ff71e6d923969d933e1ba7e0db857782d36cd19/ipc/shm.c#L1534-L1555