ntdll: Clear heap blocks also for WARN_ON(heap).
This commit is contained in:
parent
3ee3058677
commit
d73dbecf68
|
@ -137,7 +137,7 @@ static BOOL HEAP_IsRealArena( HEAP *heapPtr, DWORD flags, LPCVOID block, BOOL qu
|
||||||
/* mark a block of memory as free for debugging purposes */
|
/* mark a block of memory as free for debugging purposes */
|
||||||
static inline void mark_block_free( void *ptr, SIZE_T size )
|
static inline void mark_block_free( void *ptr, SIZE_T size )
|
||||||
{
|
{
|
||||||
if (TRACE_ON(heap)) memset( ptr, ARENA_FREE_FILLER, size );
|
if (TRACE_ON(heap) || WARN_ON(heap)) memset( ptr, ARENA_FREE_FILLER, size );
|
||||||
#ifdef VALGRIND_MAKE_NOACCESS
|
#ifdef VALGRIND_MAKE_NOACCESS
|
||||||
VALGRIND_DISCARD( VALGRIND_MAKE_NOACCESS( ptr, size ));
|
VALGRIND_DISCARD( VALGRIND_MAKE_NOACCESS( ptr, size ));
|
||||||
#endif
|
#endif
|
||||||
|
@ -157,7 +157,7 @@ static inline void mark_block_uninitialized( void *ptr, SIZE_T size )
|
||||||
#ifdef VALGRIND_MAKE_WRITABLE
|
#ifdef VALGRIND_MAKE_WRITABLE
|
||||||
VALGRIND_DISCARD( VALGRIND_MAKE_WRITABLE( ptr, size ));
|
VALGRIND_DISCARD( VALGRIND_MAKE_WRITABLE( ptr, size ));
|
||||||
#endif
|
#endif
|
||||||
if (TRACE_ON(heap))
|
if (TRACE_ON(heap) || WARN_ON(heap))
|
||||||
{
|
{
|
||||||
memset( ptr, ARENA_INUSE_FILLER, size );
|
memset( ptr, ARENA_INUSE_FILLER, size );
|
||||||
#ifdef VALGRIND_MAKE_WRITABLE
|
#ifdef VALGRIND_MAKE_WRITABLE
|
||||||
|
|
Loading…
Reference in New Issue