https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112510
--- Comment #13 from Vladimir Sadovnikov <sadko4u at gmail dot com> --- Here is the full scenario: ~$ g++ --version g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~$ g++ -fsanitize=address -mavx512f -Og test.cpp ~$ export ASAN_OPTIONS=detect_stack_use_after_return=0 ~$ ./a.out ~$ export ASAN_OPTIONS=detect_stack_use_after_return=1 ~$ ./a.out AddressSanitizer:DEADLYSIGNAL ================================================================= ==1507764==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x5573dbd162dc bp 0x7fffd196ba60 sp 0x7fffd196b640 T0) ==1507764==The signal is caused by a READ memory access. ==1507764==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used. #0 0x5573dbd162dc in gate_x1_curve(float*, float const*, dsp::gate_knee_t const*, unsigned long) (/home/sadko/a.out+0x12dc) #1 0x5573dbd1664e in main (/home/sadko/a.out+0x164e) #2 0x7f50b61f0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #3 0x7f50b61f0e3f in __libc_start_main_impl ../csu/libc-start.c:392 #4 0x5573dbd16124 in _start (/home/sadko/a.out+0x1124) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/sadko/a.out+0x12dc) in gate_x1_curve(float*, float const*, dsp::gate_knee_t const*, unsigned long) ==1507764==ABORTING ~$ gdb a.out GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from a.out... (gdb) r Starting program: /home/sadko/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00005555555552dc in gate_x1_curve(float*, float const*, dsp::gate_knee_t const*, unsigned long) () (gdb) display /10i $pc 1: x/10i $pc => 0x5555555552dc <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+243>: vmovaps %zmm0,0x120(%rbx) 0x5555555552e6 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+253>: vmovaps %zmm1,0x160(%rbx) 0x5555555552f0 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+263>: vmovaps %zmm2,0x1a0(%rbx) 0x5555555552fa <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+273>: vmovaps %zmm3,0x1e0(%rbx) 0x555555555304 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+283>: vmovaps %zmm4,0x220(%rbx) 0x55555555530e <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+293>: vmovaps %zmm5,0x260(%rbx) 0x555555555318 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+303>: vmovaps %zmm6,0x2a0(%rbx) 0x555555555322 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+313>: vmovaps %zmm7,0x2e0(%rbx) 0x55555555532c <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+323>: cmp %rbx,0x18(%rsp) 0x555555555331 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+328>: jne 0x5555555553a8 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+447> (gdb) i r rbx rbx 0x7ffff3df9000 140737284902912 (gdb)