|
From: <sv...@va...> - 2015-09-05 21:28:05
|
Author: florian Date: Sat Sep 5 22:27:58 2015 New Revision: 15632 Log: Strange segments in /proc/self/maps have been observed in the field. Namely those with a file name and an inode number but without major and minor device numbers. See for instance https://bugs.kde.org/124528#c11 This patch also recognises segments with a file name as FileV segments (which is what valgrind used to do prior to r5818). Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c ============================================================================== --- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original) +++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Sat Sep 5 22:27:58 2015 @@ -1519,12 +1519,11 @@ seg.hasX = toBool(prot & VKI_PROT_EXEC); seg.hasT = False; - /* Don't use the presence of a filename to decide if a segment in - the initial /proc/self/maps to decide if the segment is an AnonV - or FileV segment as some systems don't report the filename. Use - the device and inode numbers instead. Fixes bug #124528. */ + /* A segment in the initial /proc/self/maps is considered a FileV + segment if either it has a file name associated with it or both its + device and inode numbers are != 0. See bug #124528. */ seg.kind = SkAnonV; - if (dev != 0 && ino != 0) + if (filename || (dev != 0 && ino != 0)) seg.kind = SkFileV; # if defined(VGO_darwin) |