Comment 5 for bug 2023424

Revision history for this message
Dimitry Andric (dimitry.unified-streaming.com) wrote :

FWIW I've built stock releases/gcc-13.2.0 locally on a Ubuntu 24.04 box (configured with --disable-multilib --disable-bootstrap --enable-languages=c,c++ --enable-libsanitizer --disable-libquadmath --disable-libgomp --disable-libvtv --disable-werror --disable-nls), and indeed it also reproduces with that. And you need both -fsanitize=address and -fstack-protector:

$ ~/ins/gcc-13.2.0-0-gc891d8dc23e/bin/gcc -fsanitize=address asan-align.c -o asan-align

$ ./asan-align
explicitly aligned variable: 0x7f1241c00040

$ ~/ins/gcc-13.2.0-0-gc891d8dc23e/bin/gcc -fsanitize=address -fstack-protector asan-align.c -o asan-align

$ ./asan-align
explicitly aligned variable: 0x7f869ea00020
asan-align: asan-align.c:11: main: Assertion `addr % 64 == 0' failed.
Aborted