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:
@ -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)
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user