https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105107

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
You'll see it with:

gcc-11 pr105107.c -fsanitize=address -g -O2 &&
ASAN_OPTIONS=detect_stack_use_after_return=1 ./a.out
addr of e=0x7ffff39f4020
write to 0x7ffff39f4020
=================================================================
==31825==ERROR: AddressSanitizer: stack-use-after-return on address
0x7ffff39f4020 at pc 0x000000401373 bp 0x7fffffffdaf0 sp 0x7fffffffdae8
WRITE of size 4 at 0x7ffff39f4020 thread T0
    #0 0x401372 in i /home/marxin/Programming/testcases/pr105107.c:19
    #1 0x4010d1 in main /home/marxin/Programming/testcases/pr105107.c:25
    #2 0x7ffff73be62f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
    #3 0x7ffff73be6ef in __libc_start_main_impl ../csu/libc-start.c:392
    #4 0x401134 in _start (/home/marxin/Programming/testcases/a.out+0x401134)

Reply via email to