From: Julian Seward Date: Sun, 7 Jan 2007 01:49:31 +0000 (+0000) Subject: parse_procselfmaps: don't hand zero-length mappings to X-Git-Tag: svn/VALGRIND_3_2_2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8508572923625d3c7020b96cf975ff34134df96a;p=thirdparty%2Fvalgrind.git parse_procselfmaps: don't hand zero-length mappings to *record_mapping, since they can't really be represented by the segment table herein, and are mistaken for a mapping which covers the entire address space. Intended to fix #132998, but fix has not been verified. It does not appear to cause any other failures though. git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6480 --- diff --git a/coregrind/m_aspacemgr/aspacemgr.c b/coregrind/m_aspacemgr/aspacemgr.c index 4c555ba7d2..9e42f39f72 100644 --- a/coregrind/m_aspacemgr/aspacemgr.c +++ b/coregrind/m_aspacemgr/aspacemgr.c @@ -3412,9 +3412,10 @@ static void parse_procselfmaps ( if (record_gap && gapStart < start) (*record_gap) ( gapStart, start-gapStart ); - (*record_mapping) ( start, endPlusOne-start, - prot, dev, ino, - foffset, filename ); + if (record_mapping && start < endPlusOne) + (*record_mapping) ( start, endPlusOne-start, + prot, dev, ino, + foffset, filename ); if ('\0' != tmp) { filename[i_eol - i] = tmp;