From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2ACE53857704; Mon, 29 May 2023 20:54:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ACE53857704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685393658; bh=DHlm3+MjBVmDjdYu1THuE7TUiXUbSium1ugoIt27V4U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y/A0Y0cBfWps2lf2Q7AM/lp444f2gGu3Is4aMMAwyV0tB+W0VbybqPZjFPZGBUO6O zBqmPnw5T73SRPJQ1NookfdDMDsKpPGmDrZK2L0ILEPkFcoXYNWJt8FDeDgwIXkuQh TImRwTq+odWCWYhhDCtWHPGROFOqfnoX056Zvn7k= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110027] Misaligned vector store on detect_stack_use_after_return Date: Mon, 29 May 2023 20:54:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget everconfirmed component cf_reconfirmed_on bug_status keywords cf_known_to_work Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110027 Andrew Pinski 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 --- (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 uncle= ar > 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 Fedo= ra does not. apinski@xeond:~/src/upstream-gcc$ ~/upstream-gcc/bin/gcc t.c -mavx512f -fsanitize=3Daddress -g apinski@xeond:~/src/upstream-gcc$ LD_LIBRARY_PATH=3D~/upstream-gcc/lib64 ./= a.out ;echo $? 0 apinski@xeond:~/src/upstream-gcc$ ~/upstream-gcc/bin/gcc t.c -mavx512f -fsanitize=3Daddress -g -fstack-protector-strong apinski@xeond:~/src/upstream-gcc$ LD_LIBRARY_PATH=3D~/upstream-gcc/lib64 ./= a.out ;echo $? AddressSanitizer:DEADLYSIGNAL =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D22803=3D=3DERROR: AddressSanitizer: SEGV on unknown address (pc 0x000= 000400929 bp 0x7fff1989a900 sp 0x7fff1989a800 T0) =3D=3D22803=3D=3DThe signal is caused by a READ memory access. =3D=3D22803=3D=3DHint: this fault was caused by a dereference of a high val= ue 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 =3D=3D22803=3D=3DABORTING 1=