95059f9c breaks some 32bit architectures in linux-user on amd64
After commit 95059f9c "include/exec: Change reserved_va semantics to last byte" (included in 8.0), some programs run within linux-user emulation on amd64, start having memory (allocation) issues. Examples include:
Reportedly similar issue also happens on sparc and some other arches, but I haven't analyzed the matter on those architectures. Failure cases so far are related to processes heavily using mmap(), but this might as well be just a red herring.
The same behavor is observed on 8.0 (stable) and current qemu/master. Reverting this commit makes the issue to go away.
Running it with "qemu-hppa -R $((0xffffffff-1))" also fixes the problem, - so reducing the reserved-va range by a single byte is already enough for the problem to go away.
Edited by Michael Tokarev