|
From: <sv...@va...> - 2006-08-28 12:21:24
|
Author: sewardj
Date: 2006-08-28 13:21:19 +0100 (Mon, 28 Aug 2006)
New Revision: 6023
Log:
Merge r5990 (fix for: Livelocks entire machine)
Modified:
branches/VALGRIND_3_2_BRANCH/memcheck/mc_leakcheck.c
Modified: branches/VALGRIND_3_2_BRANCH/memcheck/mc_leakcheck.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/memcheck/mc_leakcheck.c 2006-08-28 12:19=
:40 UTC (rev 6022)
+++ branches/VALGRIND_3_2_BRANCH/memcheck/mc_leakcheck.c 2006-08-28 12:21=
:19 UTC (rev 6023)
@@ -763,6 +763,21 @@
continue;
if (seg->isCH)
continue;
+
+ /* Don't poke around in device segments as this may cause
+ hangs. Exclude /dev/zero just in case someone allocated
+ memory by explicitly mapping /dev/zero. */
+ if (seg->kind =3D=3D SkFileC=20
+ && (VKI_S_ISCHR(seg->mode) || VKI_S_ISBLK(seg->mode))) {
+ HChar* dev_name =3D VG_(am_get_filename)( seg );
+ if (dev_name && 0 =3D=3D VG_(strcmp)(dev_name, "/dev/zero")) =
{
+ /* don't skip /dev/zero */
+ } else {
+ /* skip this device mapping */
+ continue;
+ }
+ }
+
if (0)
VG_(printf)("ACCEPT %2d %p %p\n", i, seg->start, seg->end);
lc_scan_memory(seg->start, seg->end+1 - seg->start);
|