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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-linux-gnu
     Ever confirmed|0                           |1
          Component|sanitizer                   |target
   Last reconfirmed|                            |2023-05-29
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
      Known to work|                            |7.5.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Samuel Neves from comment #0)
> Interestingly this seems to be only reproducible on Arch Linux. Other gcc
> 13.1.1 builds, Fedora for instance, seem to behave correctly. It is unclear
> to me what the reason for this is.

So I figured out where the difference comes from: -fstack-protector-strong .
That is Arch linux defaults to enabling -fstack-protector-strong while Fedora
does not.

apinski@xeond:~/src/upstream-gcc$ ~/upstream-gcc/bin/gcc t.c  -mavx512f
-fsanitize=address  -g
apinski@xeond:~/src/upstream-gcc$ LD_LIBRARY_PATH=~/upstream-gcc/lib64 ./a.out
;echo $?
0


apinski@xeond:~/src/upstream-gcc$ ~/upstream-gcc/bin/gcc t.c  -mavx512f
-fsanitize=address  -g  -fstack-protector-strong
apinski@xeond:~/src/upstream-gcc$ LD_LIBRARY_PATH=~/upstream-gcc/lib64 ./a.out
;echo $?
AddressSanitizer:DEADLYSIGNAL
=================================================================
==22803==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000400929 bp
0x7fff1989a900 sp 0x7fff1989a800 T0)
==22803==The signal is caused by a READ memory access.
==22803==Hint: this fault was caused by a dereference of a high value address
(see register values below).  Disassemble the provided pc to learn which
register was used.
    #0 0x400929 in main /home/apinski/src/upstream-gcc/t.c:5
    #1 0x7ff88bf72c86 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21c86) (BuildId:
f7307432a8b162377e77a182b6cc2e53d771ec4b)
    #2 0x400769 in _start (/bajas/pinskia/src/upstream-gcc/a.out+0x400769)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/apinski/src/upstream-gcc/t.c:5 in main
==22803==ABORTING
1

Reply via email to