Support fixed address mmap without replacement.#3477
Support fixed address mmap without replacement.#3477devnexen wants to merge 1 commit intophp:masterfrom
Conversation
Reput changes for Zend fixed mapping but only for FreeBSD. Other BSD might expose some day a similar flag (private for OpenBSD for the moment for example). The Linux's part could be brought back but not before 7.4, at this time, distributions with kernel > 4.17 will be more widely available.
|
I'm slightly apprehensive about landing this again without knowing what caused the issues that @remicollet was seeing on Linux. Unless I'm missing something, both MAP_FIXED_NOREPLACE and MAP_EXCL should have exactly the same behavior (modulo the used errno, which we don't care about), so it's not clear why it should work on FreeBSD but not on Linux. Is there some difference between the two that I'm not aware of? Or possibly the Zend MM code does different things on BSD/Linux causing this? |
|
I run tests every time under FreeBSD and the flag exists since couple of years whereas on Linux it s pretty recent. Maybe that s the issue (@remicollet was testing under Fedora 29 which, if I m not mistaken, is a beta version). Thus my proposal to revisit Linux months later. |
|
Okay, let's give this another go for FreeBSD... Applied as f7b573b into 7.3+. |
Reput changes for Zend fixed mapping but only for FreeBSD.
Other BSD might expose some day a similar flag (private
for OpenBSD for the moment for example).
The Linux's part could be brought back but not before 7.4,
at this time, distributions with kernel > 4.17 will be
more widely available.