Closed bernhardmgruber closed 11 months ago
I used the Debugging with tmate GH action to ssh to a runner and debug the situation. The failure occurs in constructField
, called from the default constructor of a llama::Simd
, when the field type is std::native_simd<float>
an machines with AVX512. The crashing instruction is a vmovaps
to an address which is not a multiple of 64, thus misaligned.
The crash only happens when ASAN is turned on. If turned off on the same machine, the tests pass. Also the address on which placement new is called inside constructField
is appropriately aligned (also in ASAN builds).
Upon further inspection: it looks like ASAN generates additional code around placement new, including the misaligned store.
PR #783 tried to fix this issue, but now more cases appeared where g++ generates wrong code when ASan is enabled and SIMD is involved.
The CI often, but not deterministically, crashes inside a test using
std::simd
, with the following errors:This only happens on g++-12 and g++-13. I cannot reproduce it locally, though.