]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Change an Int to a SSizeT to avoid overflows. Fixed bug 148174.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 17 Sep 2007 22:46:45 +0000 (22:46 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 17 Sep 2007 22:46:45 +0000 (22:46 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6855

memcheck/mc_include.h
memcheck/mc_main.c
memcheck/mc_malloc_wrappers.c

index 77440cfde8c33ce8ff403670261561f37826f0b9..fb4cfb7bb03c2ef33b49a9f8b5e242bc7f46963d 100644 (file)
@@ -255,7 +255,7 @@ extern Bool MC_(record_leak_error)            ( ThreadId tid,
 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);
index 5a39efed1bc75bda2fd3f67b53f6cba29f4dc3c2..0c09b18c9406731b6436453c1778512c88f3ed19 100644 (file)
@@ -4367,7 +4367,7 @@ static Bool mc_expensive_sanity_check ( void )
 /*------------------------------------------------------------*/
 
 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;
index 9eadb01522efeeea57c58187b2de957565166c90..57b6b545a927b62eba921e4389adb82fec8109c6 100644 (file)
@@ -71,7 +71,7 @@ VgHashTable MC_(mempool_list) = NULL;
 /* 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. */