diff options
Diffstat (limited to 'storage/innobase/os/os0proc.cc')
-rw-r--r-- | storage/innobase/os/os0proc.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/innobase/os/os0proc.cc b/storage/innobase/os/os0proc.cc index 32067297a24..7e654c77c1a 100644 --- a/storage/innobase/os/os0proc.cc +++ b/storage/innobase/os/os0proc.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2019, MariaDB Corporation. +Copyright (c) 2019, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -99,7 +99,7 @@ os_mem_alloc_large( if (ptr) { *n = size; os_total_large_mem_allocated += size; - UNIV_MEM_ALLOC(ptr, size); + MEM_UNDEFINED(ptr, size); return(ptr); } @@ -122,7 +122,7 @@ skip: " Windows error " << GetLastError(); } else { os_total_large_mem_allocated += size; - UNIV_MEM_ALLOC(ptr, size); + MEM_UNDEFINED(ptr, size); } #else size = getpagesize(); @@ -137,7 +137,7 @@ skip: ptr = NULL; } else { os_total_large_mem_allocated += size; - UNIV_MEM_ALLOC(ptr, size); + MEM_UNDEFINED(ptr, size); } #endif return(ptr); @@ -153,11 +153,13 @@ os_mem_free_large( { ut_a(os_total_large_mem_allocated >= size); +#ifdef __SANITIZE_ADDRESS__ // We could have manually poisoned that memory for ASAN. // And we must unpoison it by ourself as specified in documentation // for __asan_poison_memory_region() in sanitizer/asan_interface.h // munmap() doesn't do it for us automatically. - UNIV_MEM_ALLOC(ptr, size); + MEM_UNDEFINED(ptr, size); +#endif /* __SANITIZE_ADDRESS__ */ #ifdef HAVE_LINUX_LARGE_PAGES if (my_use_large_pages && opt_large_page_size && !shmdt(ptr)) { |