n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 32 bits
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.
Release 3.11.0 (22 September 2015)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* Map anonymously at an unconstrained address for the client, and
update the segment array accordingly. */
-SysRes VG_(am_mmap_anon_float_client) ( SizeT length, Int prot )
+static SysRes am_mmap_anon_float_client ( SizeT length, Int prot, Bool isCH )
{
SysRes sres;
NSegment seg;
seg.hasR = toBool(prot & VKI_PROT_READ);
seg.hasW = toBool(prot & VKI_PROT_WRITE);
seg.hasX = toBool(prot & VKI_PROT_EXEC);
+ seg.isCH = isCH;
add_segment( &seg );
AM_SANITY_CHECK;
return sres;
}
+SysRes VG_(am_mmap_anon_float_client) ( SizeT length, Int prot )
+{
+ return am_mmap_anon_float_client (length, prot, False /* isCH */);
+}
/* Map anonymously at an unconstrained address for V, and update the
segment array accordingly. This is fundamentally how V allocates
fd, offset );
}
-/* Convenience wrapper around VG_(am_mmap_anon_float_client) which also
+/* Similar to VG_(am_mmap_anon_float_client) but also
marks the segment as containing the client heap. This is for the benefit
of the leak checker which needs to be able to identify such segments
so as not to use them as sources of roots during leak checks. */
SysRes VG_(am_mmap_client_heap) ( SizeT length, Int prot )
{
- SysRes res = VG_(am_mmap_anon_float_client)(length, prot);
-
- if (! sr_isError(res)) {
- Addr addr = sr_Res(res);
- Int ix = find_nsegment_idx(addr);
-
- nsegments[ix].isCH = True;
- }
- return res;
+ return am_mmap_anon_float_client (length, prot, True /* isCH */);
}
/* --- --- munmap helper --- --- */
extern SysRes VG_(am_shared_mmap_file_float_valgrind)
( SizeT length, UInt prot, Int fd, Off64T offset );
-/* Convenience wrapper around VG_(am_mmap_anon_float_client) which also
+/* Similar to VG_(am_mmap_anon_float_client) but also
marks the segment as containing the client heap. */
extern SysRes VG_(am_mmap_client_heap) ( SizeT length, Int prot );