UnalignedArrayAssert with -march=znver1

Summary

After the installation of https://gitlab.com/hepcedar/rivet, I encountered crashes during running it referencing me to https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html.

src/Core/DenseStorage.h:128: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 32>::plain_array() [with T = double; int Size = 4; int MatrixOrArrayOptions = 0]: Assertion `(internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.

Despite using std=c++17 the error remained. It turned out that if don't use -march=znver1 there are no crashes.

Environment

  • Operating System : Linux
  • Architecture : x64
  • Eigen Version : 3.3.4 and 3.4.0
  • Compiler Version : Gcc11.3.0
  • Compile Flags : -O2 -march=znver1
  • Vector Extension : unsure, but my cpu support the flags: avx avx2 sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 (included in znver1?)

Minimal Example

I did not try to produce a minimal example yet since I just use rivet and am not familiar with eigen.