From 3377512192d43cf077bcc94ed65ef35d81ff0639 Mon Sep 17 00:00:00 2001 From: rdevshp Date: Tue, 12 May 2026 12:36:42 +0000 Subject: [PATCH] fix pointer aliasing in malloc dispatch tables in InitNativeAllocatorDispatch --- libc/bionic/malloc_common.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libc/bionic/malloc_common.cpp b/libc/bionic/malloc_common.cpp index 51d4611a1a07..a10229e7c5b4 100644 --- a/libc/bionic/malloc_common.cpp +++ b/libc/bionic/malloc_common.cpp @@ -435,9 +435,8 @@ void InitNativeAllocatorDispatch(libc_globals* globals) { &__scudo_malloc_dispatch; if (!hardened_impl) { - globals->malloc_dispatch_table = __scudo_malloc_dispatch; - globals->current_dispatch_table = &globals->malloc_dispatch_table; - globals->default_dispatch_table = &globals->malloc_dispatch_table; + globals->current_dispatch_table = &__scudo_malloc_dispatch; + globals->default_dispatch_table = &__scudo_malloc_dispatch; } native_allocator_dispatch = table;