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 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2023424 Title: GCC 13 on Lunar exhibits AddressSanitizer/UndefinedBehaviorSanitizer bug that doesn't manifest elsewhere To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-13/+bug/2023424/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
