|
From: <sv...@va...> - 2007-09-17 22:46:44
|
Author: njn
Date: 2007-09-17 23:46:45 +0100 (Mon, 17 Sep 2007)
New Revision: 6855
Log:
Change an Int to a SSizeT to avoid overflows. Fixed bug 148174.
Modified:
trunk/memcheck/mc_include.h
trunk/memcheck/mc_main.c
trunk/memcheck/mc_malloc_wrappers.c
Modified: trunk/memcheck/mc_include.h
===================================================================
--- trunk/memcheck/mc_include.h 2007-09-17 22:35:57 UTC (rev 6854)
+++ trunk/memcheck/mc_include.h 2007-09-17 22:46:45 UTC (rev 6855)
@@ -255,7 +255,7 @@
extern Bool MC_(clo_partial_loads_ok);
/* Max volume of the freed blocks queue. */
-extern Int MC_(clo_freelist_vol);
+extern SSizeT MC_(clo_freelist_vol);
/* Do leak check at exit? default: NO */
extern LeakCheckMode MC_(clo_leak_check);
Modified: trunk/memcheck/mc_main.c
===================================================================
--- trunk/memcheck/mc_main.c 2007-09-17 22:35:57 UTC (rev 6854)
+++ trunk/memcheck/mc_main.c 2007-09-17 22:46:45 UTC (rev 6855)
@@ -4367,7 +4367,7 @@
/*------------------------------------------------------------*/
Bool MC_(clo_partial_loads_ok) = False;
-Int MC_(clo_freelist_vol) = 5000000;
+SSizeT MC_(clo_freelist_vol) = 5000000;
LeakCheckMode MC_(clo_leak_check) = LC_Summary;
VgRes MC_(clo_leak_resolution) = Vg_LowRes;
Bool MC_(clo_show_reachable) = False;
Modified: trunk/memcheck/mc_malloc_wrappers.c
===================================================================
--- trunk/memcheck/mc_malloc_wrappers.c 2007-09-17 22:35:57 UTC (rev 6854)
+++ trunk/memcheck/mc_malloc_wrappers.c 2007-09-17 22:46:45 UTC (rev 6855)
@@ -71,7 +71,7 @@
/* Records blocks after freeing. */
static MC_Chunk* freed_list_start = NULL;
static MC_Chunk* freed_list_end = NULL;
-static Int freed_list_volume = 0;
+static SSizeT freed_list_volume = 0;
/* Put a shadow chunk on the freed blocks queue, possibly freeing up
some of the oldest blocks in the queue at the same time. */
|