mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-13 19:21:36 +03:00
mcheck Fix malloc_usable_size [BZ #22057]
Interpose malloc_usable_size to return the correct mcheck value for malloc_usable_size. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@ -399,6 +399,8 @@ strong_alias (__debug_calloc, calloc)
|
||||
size_t
|
||||
malloc_usable_size (void *mem)
|
||||
{
|
||||
if (__is_malloc_debug_enabled (MALLOC_MCHECK_HOOK))
|
||||
return mcheck_usable_size (mem);
|
||||
if (__is_malloc_debug_enabled (MALLOC_CHECK_HOOK))
|
||||
return malloc_check_get_size (mem);
|
||||
|
||||
|
Reference in New Issue
Block a user