Fix undefined behavior flagged by UBSAN
authorKevin Boyd <kevin44boyd@gmail.com>
Wed, 29 Jul 2020 11:42:59 +0000 (11:42 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 29 Jul 2020 11:42:59 +0000 (11:42 +0000)
commit06c0d798af68736a62d1930b6fd661398bb1154e
tree8b29d052d267952fc2c6b4b4b17092454f9445b3
parent49e9b6b20808ff704597a9089f6f50d3451b24aa
Fix undefined behavior flagged by UBSAN

Running under the UBSAN sanitizer pointed out a bunch of undefined
behavior - most of them were harmless issues in rarely taken branches,
but should still be avoided.
22 files changed:
CMakeLists.txt
admin/gitlab-ci/gromacs.gitlab-ci.yml
admin/ubsan-suppressions.txt [new file with mode: 0644]
cmake/gmxBuildTypeUBSAN.cmake [new file with mode: 0644]
src/config.h.cmakein
src/gromacs/applied_forces/tests/electricfield.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/fileio/xdrd.cpp
src/gromacs/gmxpreprocess/gpp_nextnb.cpp
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdrunutility/threadaffinity.cpp
src/gromacs/nbnxm/pairlist.cpp
src/gromacs/onlinehelp/tests/helpwritercontext.cpp
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/sm_same.cpp
src/gromacs/utility/arrayref.h
src/gromacs/utility/loggerbuilder.h