From 3f2e579afa2d5f8e2731f18c22b6f6b40f453319 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 17 Sep 2007 22:46:45 +0000 Subject: [PATCH] Change an Int to a SSizeT to avoid overflows. Fixed bug 148174. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6855 --- memcheck/mc_include.h | 2 +- memcheck/mc_main.c | 2 +- memcheck/mc_malloc_wrappers.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/memcheck/mc_include.h b/memcheck/mc_include.h index 77440cfde..fb4cfb7bb 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 5a39efed1..0c09b18c9 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 9eadb0152..57b6b545a 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. */