`memswap` on Skylake failing
We seem to have an issue on COSMA7 with memswap. When I run the EAGLE_25
non-MPI test it fails in the memswap function during space_parts_sort
. When I switch off optimization the problem is not seen. With optimization back and the sanitizer enabled I get:
ASAN:DEADLYSIGNAL
=================================================================
==324916==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004175dc bp 0x7ffc0217ca70 sp 0x7ffc0217c800 T0)
==324916==The signal is caused by a READ memory access.
==324916==Hint: address points to the zero page.
#0 0x4175db in memswap /cosma7/data/dp004/pdraper/swiftsim/src/memswap.h:65
#1 0x4175db in space_parts_sort /cosma7/data/dp004/pdraper/swiftsim/src/space.c:1405
#2 0x41abb9 in space_rebuild /cosma7/data/dp004/pdraper/swiftsim/src/space.c:807
#3 0x47807b in engine_rebuild /cosma7/data/dp004/pdraper/swiftsim/src/engine.c:3805
#4 0x47ae48 in engine_init_particles /cosma7/data/dp004/pdraper/swiftsim/src/engine.c:4337
#5 0x407535 in main /cosma7/data/dp004/pdraper/swiftsim/examples/main.c:869
#6 0x2b64619c3c04 in __libc_start_main (/lib64/libc.so.6+0x21c04)
#7 0x40965b (/cosma7/data/dp004/pdraper/swiftsim/examples/swift+0x40965b)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /cosma7/data/dp004/pdraper/swiftsim/src/memswap.h:65 in memswap
Could this be related to @matthieu observation in #428 (closed)? Maybe not as this line is swapping parts and they should be aligned.