Fixes problems with pre-syscall versus post-syscall mmap handling which can lead to asserts. Adds a check-only version of app_memory_protection_change() for use in pre-syscall, delaying all vmarea updates to post-syscall. Adds protection change checking inside app_memory_allocation(), simplifying caller usage and providing broader coverage of mmap behavior.
Adds a vmm attribute to all_memory_areas and disallows merging across that boundary, to match kernel behavior and avoid mismatch warnings with the above fix in place which does extra memory querying on each mmap.
Adds some mmap sequences to linux.mmap to provide some test coverage for these particular page protection change orderings.
Fixes #3759 (closed)