From: Philippe Waroquiers Date: Sun, 22 May 2016 20:48:09 +0000 (+0000) Subject: Document brk segment limitation, reference manual in limit reached msg. X-Git-Tag: svn/VALGRIND_3_12_0~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=268ff84f7b163f2a87212fc83f85206fbfc9e539;p=thirdparty%2Fvalgrind.git Document brk segment limitation, reference manual in limit reached msg. The msg telling brk cannot be extended confuses some users so improve the documentation and have the msg referencing the doc. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15880 --- diff --git a/NEWS b/NEWS index 56bbee39ea..0895f8c8f9 100644 --- a/NEWS +++ b/NEWS @@ -107,6 +107,7 @@ n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 and amd64 n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap n-i-bz false positive leaks due to aspacemgr merging non heap segments with heap segments. n-i-bz Fix ppoll_alarm exclusion on OS X +n-i-bz Document brk segment limitation, reference manual in limit reached msg. Release 3.11.0 (22 September 2015) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index dd1da9c3f0..ed44494350 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -1324,6 +1324,7 @@ static Addr do_brk ( Addr newbrk, ThreadId tid ) else VG_(umsg)("Cannot map memory to grow brk segment in thread #%u " "to %#lx\n", tid, newbrkP); + VG_(umsg)("(see section Limitations in user manual)\n"); goto bad; } diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 7628836669..34cb2c6bc9 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -2778,6 +2778,18 @@ programs actually work fine. subject to the following constraints: + + Valgrind determines at startup the size of the 'brk segment' + using the RLIMIT_DATA rlim_cur, with a minimum of 1 MB and a + maximum of 8 MB. Valgrind outputs a message each time a program + tries to extend the brk segment beyond the size determined at + startup. Most programs will work properly with this limit, + typically by switching to the use of mmap to get more memory. + If your program really needs a big brk segment, you must change + the 8 MB hardcoded limit and recompile Valgrind. + + + On x86 and amd64, there is no support for 3DNow! instructions. If the translator encounters these, Valgrind will diff --git a/memcheck/tests/linux/brk.stderr.exp b/memcheck/tests/linux/brk.stderr.exp index 17d8a703d5..8cbe622378 100644 --- a/memcheck/tests/linux/brk.stderr.exp +++ b/memcheck/tests/linux/brk.stderr.exp @@ -1,6 +1,8 @@ brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual) brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual) HEAP SUMMARY: in use at exit: ... bytes in ... blocks diff --git a/none/tests/linux/brk-overflow1.stderr.exp b/none/tests/linux/brk-overflow1.stderr.exp index f1315792ee..96741db856 100644 --- a/none/tests/linux/brk-overflow1.stderr.exp +++ b/none/tests/linux/brk-overflow1.stderr.exp @@ -1,3 +1,4 @@ brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual) diff --git a/none/tests/linux/brk-overflow2.stderr.exp b/none/tests/linux/brk-overflow2.stderr.exp index df6285842f..5cdf1f7c34 100644 --- a/none/tests/linux/brk-overflow2.stderr.exp +++ b/none/tests/linux/brk-overflow2.stderr.exp @@ -1,5 +1,8 @@ brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual) brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual) brk segment overflow in thread #1: can't grow to 0x........ +(see section Limitations in user manual)