Commit 3bf10012 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 19af1890
......@@ -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)
/*
......
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