]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When unmapping segments from below aspacem_minAddr, convert them back
authorJulian Seward <jseward@acm.org>
Mon, 11 Sep 2006 19:49:35 +0000 (19:49 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 11 Sep 2006 19:49:35 +0000 (19:49 +0000)
into SkResvns, not SkFrees.  Fixes #133694.  Thanks to Tom Hughes for
patch and test case.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6049

coregrind/m_aspacemgr/aspacemgr.c

index 41a8616b74ade510f9f631d20fa0e3cec9c354d1..c410deccb4081008dba86d3a3d7d87dd3ec2a12a 100644 (file)
@@ -2251,6 +2251,10 @@ Bool VG_(am_notify_munmap)( Addr start, SizeT len )
        && /* check previous comparison is meaningful */
           aspacem_maxAddr < Addr_MAX)
       seg.kind = SkResvn;
+   else 
+   /* Ditto for segments from below aspacem_minAddr. */
+   if (seg.end < aspacem_minAddr && aspacem_minAddr > 0)
+      seg.kind = SkResvn;
    else
       seg.kind = SkFree;