lalpulsar build with gcc 11 fails with stringop-overread
Attempting to build lalpulsar with gcc-11 fails:
In file included from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALError.h:29,
from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALStatusMacros.h:38,
from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALStdlib.h:58,
from ../include/lal/LineRobustStats.h:41,
from ../../../../lalpulsar/test/LineRobustStatsTest.c:23:
../../../../lalpulsar/test/LineRobustStatsTest.c: In function 'XLALCheckBSGLVectorFunctions':
../../../../lalpulsar/test/LineRobustStatsTest.c:417:37: error: 'XLALCreateBSGLSetup' reading 40 bytes from a region of size 12 [-Werror=stringop-overread]
417 | XLAL_CHECK ( (setup_noLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, FALSE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/XLALError.h:659:23: note: in definition of macro '_XLAL_CHECK_IMPL_'
659 | if (!(assertion)) { \
| ^~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:417:3: note: in expansion of macro 'XLAL_CHECK'
417 | XLAL_CHECK ( (setup_noLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, FALSE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:417:37: note: referencing argument 3 of type 'const REAL4 *' {aka 'const float *'}
417 | XLAL_CHECK ( (setup_noLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, FALSE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/XLALError.h:659:23: note: in definition of macro '_XLAL_CHECK_IMPL_'
659 | if (!(assertion)) { \
| ^~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:417:3: note: in expansion of macro 'XLAL_CHECK'
417 | XLAL_CHECK ( (setup_noLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, FALSE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~
In file included from ../../../../lalpulsar/test/LineRobustStatsTest.c:23:
../include/lal/LineRobustStats.h:59:1: note: in a call to function 'XLALCreateBSGLSetup'
59 | XLALCreateBSGLSetup ( const UINT4 numDetectors,
| ^~~~~~~~~~~~~~~~~~~
In file included from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALError.h:29,
from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALStatusMacros.h:38,
from /builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/LALStdlib.h:58,
from ../include/lal/LineRobustStats.h:41,
from ../../../../lalpulsar/test/LineRobustStatsTest.c:23:
../../../../lalpulsar/test/LineRobustStatsTest.c:418:37: error: 'XLALCreateBSGLSetup' reading 40 bytes from a region of size 12 [-Werror=stringop-overread]
418 | XLAL_CHECK ( (setup_withLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, TRUE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/XLALError.h:659:23: note: in definition of macro '_XLAL_CHECK_IMPL_'
659 | if (!(assertion)) { \
| ^~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:418:3: note: in expansion of macro 'XLAL_CHECK'
418 | XLAL_CHECK ( (setup_withLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, TRUE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:418:37: note: referencing argument 3 of type 'const REAL4 *' {aka 'const float *'}
418 | XLAL_CHECK ( (setup_withLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, TRUE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/duncanmmacleod/lalsuite/lalsuite-7.0.1-dev20211005/_build/sub/lal/include/lal/XLALError.h:659:23: note: in definition of macro '_XLAL_CHECK_IMPL_'
659 | if (!(assertion)) { \
| ^~~~~~~~~
../../../../lalpulsar/test/LineRobustStatsTest.c:418:3: note: in expansion of macro 'XLAL_CHECK'
418 | XLAL_CHECK ( (setup_withLogCorr = XLALCreateBSGLSetup ( numDet, NUM_SEGS*cohFstar0, oLtLGX, TRUE, NUM_SEGS )) != NULL, XLAL_EFUNC );
| ^~~~~~~~~~
In file included from ../../../../lalpulsar/test/LineRobustStatsTest.c:23:
../include/lal/LineRobustStats.h:59:1: note: in a call to function 'XLALCreateBSGLSetup'
59 | XLALCreateBSGLSetup ( const UINT4 numDetectors,
| ^~~~~~~~~~~~~~~~~~~
See https://git.ligo.org/duncanmmacleod/lalsuite/-/jobs/1603696.