From: Nicholas Nethercote Date: Mon, 17 Sep 2007 22:46:45 +0000 (+0000) Subject: Change an Int to a SSizeT to avoid overflows. Fixed bug 148174. X-Git-Tag: svn/VALGRIND_3_3_0~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f2e579afa2d5f8e2731f18c22b6f6b40f453319;p=thirdparty%2Fvalgrind.git Change an Int to a SSizeT to avoid overflows. Fixed bug 148174. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6855 --- diff --git a/memcheck/mc_include.h b/memcheck/mc_include.h index 77440cfde8..fb4cfb7bb0 100644 --- a/memcheck/mc_include.h +++ b/memcheck/mc_include.h @@ -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); diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 5a39efed1b..0c09b18c94 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -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; diff --git a/memcheck/mc_malloc_wrappers.c b/memcheck/mc_malloc_wrappers.c index 9eadb01522..57b6b545a9 100644 --- a/memcheck/mc_malloc_wrappers.c +++ b/memcheck/mc_malloc_wrappers.c @@ -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. */