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

--- Comment #15 from Vladimir Sadovnikov <sadko4u at gmail dot com> ---
Hmmm. But why not? We're just looking for the value stored in %rbx register...

Here's scenario for GCC 7.5.0:

~/tmp> gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 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.

~/tmp> g++ -fsanitize=address -mavx512f -Og test.cpp
~/tmp> export ASAN_OPTIONS=detect_stack_use_after_return=1
~/tmp> ./a.out 
Illegal instruction (core dumped)
~/tmp> gdb ./a.out 
GNU gdb (GDB; SUSE Linux Enterprise 15) 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-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
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/tmp/a.out 
Missing separate debuginfos, use: zypper install
glibc-debuginfo-2.31-150300.63.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00000000004007ce in gate_x1_curve(float*, float const*, dsp::gate_knee_t
const*, unsigned long) ()
Missing separate debuginfos, use: zypper install
libasan4-debuginfo-7.5.0+r278197-150000.4.35.1.x86_64
libgcc_s1-debuginfo-13.2.1+git7813-150000.1.3.3.x86_64
libstdc++6-debuginfo-13.2.1+git7813-150000.1.3.3.x86_64
(gdb) disp /16i $pc
2: x/16i $pc
=> 0x4007ce <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+167>: vbroadcastss
(%r15),%zmm0
   0x4007d4 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+173>: vbroadcastss
0x4(%r15),%zmm1
   0x4007db <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+180>: vbroadcastss
0x8(%r15),%zmm2
   0x4007e2 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+187>: vbroadcastss
0xc(%r15),%zmm3
   0x4007e9 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+194>: vbroadcastss
0x10(%r15),%zmm4
   0x4007f0 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+201>: vbroadcastss
0x14(%r15),%zmm5
   0x4007f7 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+208>: vbroadcastss
0x18(%r15),%zmm6
   0x4007fe <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+215>: vbroadcastss
0x1c(%r15),%zmm7
   0x400805 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+222>: vmovaps
%zmm0,0x140(%rbx)
   0x40080c <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+229>: vmovaps
%zmm1,0x180(%rbx)
   0x400813 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+236>: vmovaps
%zmm2,0x1c0(%rbx)
   0x40081a <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+243>: vmovaps
%zmm3,0x200(%rbx)
   0x400821 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+250>: vmovaps
%zmm4,0x240(%rbx)
   0x400828 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+257>: vmovaps
%zmm5,0x280(%rbx)
   0x40082f <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+264>: vmovaps
%zmm6,0x2c0(%rbx)
   0x400836 <_Z13gate_x1_curvePfPKfPKN3dsp11gate_knee_tEm+271>: vmovaps
%zmm7,0x300(%rbx)
(gdb) i r rbx
rbx            0x7ffff3900000      140737279688704

Reply via email to