]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Document brk segment limitation, reference manual in limit reached msg.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 22 May 2016 20:48:09 +0000 (20:48 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 22 May 2016 20:48:09 +0000 (20:48 +0000)
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

NEWS
coregrind/m_syswrap/syswrap-generic.c
docs/xml/manual-core.xml
memcheck/tests/linux/brk.stderr.exp
none/tests/linux/brk-overflow1.stderr.exp
none/tests/linux/brk-overflow2.stderr.exp

diff --git a/NEWS b/NEWS
index 56bbee39eaf4a2755fe6153a6fa41c22785263c0..0895f8c8f9babd9e172bae883cf68084a5948d9e 100644 (file)
--- 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)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index dd1da9c3f00185ca69d18be0b8f4d1f2101bc916..ed444943504ae364a9e50c087afc02ca8046544f 100644 (file)
@@ -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;
    }
 
index 762883666910e92539f005ff2d9bb4cdc17fdc87..34cb2c6bc94c8c7cb10ea54f89fadf78ea3311a8 100644 (file)
@@ -2778,6 +2778,18 @@ programs actually work fine.</para>
 subject to the following constraints:</para>
 
  <itemizedlist>
+  <listitem>
+    <para>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.
+   </para>
+  </listitem>
+
   <listitem>
    <para>On x86 and amd64, there is no support for 3DNow!
    instructions.  If the translator encounters these, Valgrind will
index 17d8a703d549dbf6dd2dac5f20a761b06721e047..8cbe6223783c23ad1e9a95b7a2711b5f1dcb4090 100644 (file)
@@ -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
index f1315792ee01650b1e4fd7d357fee7e03c41baca..96741db856134d72b4dc6f674ec59a71bd383dde 100644 (file)
@@ -1,3 +1,4 @@
 
 brk segment overflow in thread #1: can't grow to 0x........
+(see section Limitations in user manual)
 
index df6285842f9bdfc3b65d9beea75cc3900d5c88cc..5cdf1f7c345d122921af8f31e054fb5b63b2bb51 100644 (file)
@@ -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)