Files
clamav/libclamav/c++/bytecode2llvm.cpp
Török Edvin 3eef86ee9f Workaround crash due to gcc stack alignment requirements (bb #2270).
GCC (4.4 at least) requires and creates functions with 16-byte stack alignment
on 32-bit Linux too.
If they happen to use SSE instructions they will crash if incoming stack
alignment is not 16-byte.

LLVM claims that 4-byte stack alignment is the standard, and it only aligns to
4-byte, hence the crash. Apparently older versions of GCC/glibc would crash
if it set alignment to 16-byte.

But since the oldest GCC we support is 4.1.2, and disable LLVM on anything older
just set stack alignment to 16-byte for all functions. LLVM will realign stack
as needed. To be safe turn this on only on Linux.

This should really be fixed by either GCC or LLVM, but until that happens (see
LLVM PR8152) lets use this workaround.
2010-09-15 13:19:48 +03:00

63 KiB