From: Florian Krohm Date: Sat, 13 Sep 2014 22:39:31 +0000 (+0000) Subject: Document that VG_(newSWA) never returns NULL (because its X-Git-Tag: svn/VALGRIND_3_11_0~999 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6790a772def36c6a40d7604d4c17d0ad50cde7aa;p=thirdparty%2Fvalgrind.git Document that VG_(newSWA) never returns NULL (because its allocation function does not). Audit call sites. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14533 --- diff --git a/helgrind/libhb_core.c b/helgrind/libhb_core.c index 8101f2ae92..bd26f28a3b 100644 --- a/helgrind/libhb_core.c +++ b/helgrind/libhb_core.c @@ -4429,7 +4429,6 @@ static void event_map_init ( void ) "libhb.event_map_init.4 (oldref tree)", HG_(free) ); - tl_assert(oldrefTree); oldrefGen = 0; oldrefGenIncAt = 0; diff --git a/include/pub_tool_sparsewa.h b/include/pub_tool_sparsewa.h index a37edf7ce9..f918eb2497 100644 --- a/include/pub_tool_sparsewa.h +++ b/include/pub_tool_sparsewa.h @@ -50,7 +50,8 @@ typedef struct _SparseWA SparseWA; /* opaque */ -// Create a new one, using the specified allocator/deallocator +// Create a new one, using the specified allocator/deallocator. +// Never returns NULL. SparseWA* VG_(newSWA) ( void*(*alloc_nofail)(const HChar* cc, SizeT), const HChar* cc, void(*dealloc)(void*) );