|
From: <sv...@va...> - 2013-09-04 06:17:58
|
sewardj 2013-09-04 06:17:44 +0000 (Wed, 04 Sep 2013)
New Revision: 13529
Log:
check_uuid_matches: fix infinite loop following rewrite of this
function during big overhaul of the debuginfo reader earlier this
year.
Modified files:
trunk/coregrind/m_debuginfo/readmacho.c
Modified: trunk/coregrind/m_debuginfo/readmacho.c (+2 -2)
===================================================================
--- trunk/coregrind/m_debuginfo/readmacho.c 2013-09-03 15:22:14 +00:00 (rev 13528)
+++ trunk/coregrind/m_debuginfo/readmacho.c 2013-09-04 06:17:44 +00:00 (rev 13529)
@@ -652,7 +652,7 @@
UInt i;
/* Scan through the 1K chunk we got, looking for the start char. */
for (i = 0; i < (UInt)nGot; i++) {
- if (buf[i] != first)
+ if (LIKELY(buf[i] != first))
continue;
/* first char matches. See if we can get 16 bytes at this
offset, and compare. */
@@ -662,8 +662,8 @@
if (0 == VG_(memcmp)(&buff16[0], &uuid[0], 16))
return True;
}
- curr_off += nGot;
}
+ curr_off += nGot;
}
return False;
}
|