Commit e0633f25 authored by Eugene Kosov's avatar Eugene Kosov

MDEV-18243 incorrect ASAN instrumentation

Poisoning memory after munmap() and friends is totally incorrect as this memory
could be anything.

os_mem_free_large(): remove memory poisoning
parent 71e9f0d1
...@@ -192,7 +192,6 @@ os_mem_free_large( ...@@ -192,7 +192,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
return; return;
} }
#endif /* HAVE_LARGE_PAGES && UNIV_LINUX */ #endif /* HAVE_LARGE_PAGES && UNIV_LINUX */
...@@ -208,7 +207,6 @@ os_mem_free_large( ...@@ -208,7 +207,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
} }
#elif !defined OS_MAP_ANON #elif !defined OS_MAP_ANON
ut_free(ptr); ut_free(ptr);
...@@ -226,7 +224,6 @@ os_mem_free_large( ...@@ -226,7 +224,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
} }
#endif #endif
} }
...@@ -247,7 +247,6 @@ os_mem_free_large( ...@@ -247,7 +247,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
return; return;
} }
#endif /* HAVE_LARGE_PAGES && UNIV_LINUX */ #endif /* HAVE_LARGE_PAGES && UNIV_LINUX */
...@@ -263,7 +262,6 @@ os_mem_free_large( ...@@ -263,7 +262,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
} }
#elif !defined OS_MAP_ANON #elif !defined OS_MAP_ANON
ut_free(ptr); ut_free(ptr);
...@@ -281,7 +279,6 @@ os_mem_free_large( ...@@ -281,7 +279,6 @@ os_mem_free_large(
ut_a(ut_total_allocated_memory >= size); ut_a(ut_total_allocated_memory >= size);
ut_total_allocated_memory -= size; ut_total_allocated_memory -= size;
os_fast_mutex_unlock(&ut_list_mutex); os_fast_mutex_unlock(&ut_list_mutex);
UNIV_MEM_FREE(ptr, size);
} }
#endif #endif
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment