Fix the use of brk.  This change removes the requirement for the "real" brk
segment to be moved up to stage2's brk segment.  Instead, Valgrind's
use of brk is simulated with mmap.  In order to prevent any unwanted use
of the process brk segment, it also sets the RLIMIT_DATA to 0, which will
make brk always fail.  glibc's malloc will use mmap to allocate if brk
fails.  We try to intercept glibc's brk, but malloc seems to always use the
library-internal version.  (The client's use of brk has always been simulated,
and is unaffected by this change.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2266 a5019735-40e9-0310-863c-91ae7b9d1cf9
10 files changed