1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-28762: Fixup for clang

Unlike GCC, clang could optimize away alloca() and thus the
ALLOCATE_MEM_ON_STACK() instrumentation. To make it harder, let us
invoke a non-inline function on the entire allocated buffer.
This commit is contained in:
Marko Mäkelä
2022-07-26 11:00:11 +03:00
parent 19af1890b5
commit 3bf10012e0

View File

@ -31,9 +31,8 @@
#define ALLOCATE_MEM_ON_STACK(A) do \
{ \
uchar *array= (uchar*)alloca(A); \
array[0]= 1; \
array[0]++; \
array[0] ? array[0]++ : array[0]--; \
bzero(array, A); \
my_checksum(0, array, A); \
} while(0)
/*