diff options
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r-- | malloc/hooks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c index a2b93e5..52bb386 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -56,6 +56,12 @@ static int using_malloc_checking; void __malloc_check_init (void) { +#if HAVE_TUNABLES && defined (_LIBC_MTAG) + /* If memory tagging is enabled, there is no need for the boundary + checking cookie as well. */ + if ((TUNABLE_GET_FULL (glibc, memtag, enable, int32_t, NULL) & 1) != 0) + return; +#endif using_malloc_checking = 1; __malloc_hook = malloc_check; __free_hook = free_check; |