diff --git a/libclamav/c++/llvm/include/llvm/ADT/SmallVector.h b/libclamav/c++/llvm/include/llvm/ index 89acefd..2953729 100644 --- a/libclamav/c++/llvm/include/llvm/ADT/SmallVector.h +++ b/libclamav/c++/llvm/include/llvm/ADT/SmallVector.h @@ -57,17 +57,21 @@ protected: // something else. An array of char would work great, but might not be // aligned sufficiently. Instead, we either use GCC extensions, or some // number of union instances for the space, which guarantee maximal alignment. -#ifdef __GNUC__ + + // Don't use use attribute aligned here, because it makes the class alignof + // 16, and new is only guaranteed to return 8-byte aligned data (on 32-bit), + // leading to a crash. +/*#ifdef __GNUC__ typedef char U; U FirstEl __attribute__((aligned)); -#else +#else*/ union U { double D; long double LD; long long L; void *P; } FirstEl; -#endif +/*#endif*/ // Space after 'FirstEl' is clobbered, do not add any instance vars after it. protected: