|
From: <sv...@va...> - 2015-06-19 12:01:14
|
Author: florian
Date: Fri Jun 19 13:01:07 2015
New Revision: 15346
Log:
fbit_mask needs to be unsigned because it sometimes shifts a '1'
into the MSB. Found by ubsan.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-segnames.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-segnames.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-segnames.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-segnames.c Fri Jun 19 13:01:07 2015
@@ -125,10 +125,12 @@
max_refcount = 0x7fff, // 2 bytes - F-bit
max_slotsize = 0xffff, // 2 bytes
max_slotindex = 0x7fffffff, // 4 bytes - F-bit
- fbit_mask = 0x80,
+ fbit_mask_value = 0x80,
end_of_chain = 0
};
+static const UInt fbit_mask = fbit_mask_value;
+
/* The old segname implementation allowed for 1000 names on Android and
6000 names on other platforms. Each name was allowed to be 1000 characters
long. That was very wasteful. */
|