Reserves 4MB instead of just 4KB for the initial reservation for -emulate_brk, to avoid an mmap (such as a client lib) blocking the brk and the app running out during early init, when it can't recover and can crash.
Fixes two related issues:
- -vm_base_near_app was not checking for overlap with the app to see whether the default -vm_base will work. Without this fix my test below does not reproduce the bug.
- Sets the preferred base for drsyms to 0x76000000 for UNIX (it was already set for Windows) to avoid colliding with end-user clients like drmemtrace.
Tested on a static app with a certain size where libdrmemtrace.so truncates the brk and reproduces the crash: $ clang hello.c -g -o hello-static -static -Wl,-Ttext=0x71f54000 $ bin64/drrun -t drcachesim -dr_ops "-vm_base_near_app -vm_size 128M" -- hello-static
Fixes #3982 (closed)