# HG changeset patch # User Edgar Grimberg # Date 1276596038 -7200 # Node ID 831d5e603f1f9037db95bbf0362cfd224eb2e170 # Parent eb303059b6e55fe739866837ef0e6c970873b45e Add an assert to check for invalid size of the arena. diff -r eb303059b6e5 -r 831d5e603f1f packages/services/memalloc/common/current/ChangeLog --- a/packages/services/memalloc/common/current/ChangeLog Thu Jun 10 20:46:18 2010 +0000 +++ b/packages/services/memalloc/common/current/ChangeLog Tue Jun 15 12:00:38 2010 +0200 @@ -1,3 +1,8 @@ +2010-06-15 Edgar Grimberg + + * src/dlmalloc.cxx Cyg_Mempool_dlmalloc_Implementation: + Add an assert to check for invalid size of the arena. + 2009-09-01 Bart Veer * src/heapgen.tcl (tcl_path): use the makefile's HOST instead of diff -r eb303059b6e5 -r 831d5e603f1f packages/services/memalloc/common/current/src/dlmalloc.cxx --- a/packages/services/memalloc/common/current/src/dlmalloc.cxx Thu Jun 10 20:46:18 2010 +0000 +++ b/packages/services/memalloc/common/current/src/dlmalloc.cxx Tue Jun 15 12:00:38 2010 +0200 @@ -948,6 +948,8 @@ cyg_uint8 *base, cyg_int32 size, CYG_ADDRWORD /* argthru */ ) { + CYG_ASSERT(size > 0, "Invalid arena size." ); + arenabase = base; arenasize = size;