From f4051dce26ad67e4c25c7910452915337318790b Mon Sep 17 00:00:00 2001 From: OEOTYAN Date: Sun, 11 Feb 2024 03:14:00 +0800 Subject: [PATCH] fix: add pointer check --- src/ll/core/tweak/ModifyMemoryAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ll/core/tweak/ModifyMemoryAllocator.cpp b/src/ll/core/tweak/ModifyMemoryAllocator.cpp index 5257b15060..05edadc2b6 100644 --- a/src/ll/core/tweak/ModifyMemoryAllocator.cpp +++ b/src/ll/core/tweak/ModifyMemoryAllocator.cpp @@ -87,7 +87,7 @@ class MimallocMemoryAllocatorWithCheck : public MimallocMemoryAllocator { if (mi_is_in_heap_region(ptr)) { return mi_usable_size(ptr); } else { - return _msize(ptr); + return ptr ? _msize(ptr) : 0ui64; } }