-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When runnning with the gcc address sanitizer enabled using gcc 13 on Cosma the code crashes in various ways. To reproduce:
git clone git@github.com:SWIFTSIM/HBTplus.git
cd HBTplus/testing
git checkout remove_duplicate_particles_in_mergers
Note that master currently fails with the sanitizer due to a known bug, so we check out this fixed branch. Edit compile.sh and add
-DCMAKE_CXX_FLAGS_DEBUG="-g -O3 -fsanitize=address"
to the cmake command then run
bash ./run_test.sh
This will submit a batch job. Keep an eye on test_output/logs/error.err and observe that the code (probably) crashes somewhere around snapshots 6-10 with either a sanitizer error or a failed assert, or possibly both if more than one process crashes. The crash usually happens in the merger tree function call to find descendants but so far I haven't found any problems there. If I put in asserts to bounds check every single array access in that part of the code the asserts only fail if the sanitizer is enabled.