From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B5323858D38; Sun, 22 Oct 2023 18:06:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B5323858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697998012; bh=A+md3bP8cWx7Zg1G+HDQWCRwl3ajiRcOLdIJz9C8nDM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s8Hnkp6GlWPevUy3VKj2b9aNMD6qXIdPi64h8sd1weWos0woZVnHfBhGXZ80wbtaR WkuWph1Cjz2y6zSBo48zlj6/1bCpDlCo/2DOyj/fS7tVeHHLrr48G5742NQIgqeGPs TKilqtk6YMaWZTTHC1Phc5ltrClCsy6iRcuplEOs= From: "gcc at sicherha dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110027] Misaligned vector store on detect_stack_use_after_return Date: Sun, 22 Oct 2023 18:06:51 +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: gcc at sicherha dot de 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: cc attachments.created 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 Christoph Erhardt changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc at sicherha dot de --- Comment #4 from Christoph Erhardt --- Created attachment 56169 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56169&action=3Dedit Reproducer program Here's a program that can reproduce this issue more reliably - tested on Fe= dora 38, Ubuntu 23.04 and Ubuntu 23.10. I have stripped down the code as far as possible. This is how far I could g= et without losing reproducibility. Sources are in a GitHub repo: https://github.com/sicherha/gcc-asan-stack-misalign $ gcc -Wall -Wextra -g -Og -fsanitize=3Daddress -fno-stack-protector -mavx5= 12f a-repro.i=20 $ ./a.out=20 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=3D3618=3D=3DERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000= 00401789 bp 0x7ffeabbcda00 sp 0x7ffeabbcd580 T0) =3D=3D3618=3D=3DThe signal is caused by a READ memory access. =3D=3D3618=3D=3DHint: this fault was caused by a dereference of a high valu= e address (see register values below). Disassemble the provided pc to learn which register was used. #0 0x401789 in blake3_compress_subtree_wide /home/ul26967/Projects/gcc-asan-stack-misalign/a-repro.i:481 #1 0x40189b in main /home/ul26967/Projects/gcc-asan-stack-misalign/a-repro.i:488 #2 0x7f77a0210b89 in __libc_start_call_main (/lib64/libc.so.6+0x27b89) (BuildId: 3ebe8d97a0ed3e1f13476a02665c5a9442adcd78) #3 0x7f77a0210c4a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c4= a) (BuildId: 3ebe8d97a0ed3e1f13476a02665c5a9442adcd78) #4 0x4010f4 in _start (/home/ul26967/Projects/gcc-asan-stack-misalign/a.out+0x4010f4) (BuildId: e25b3ac48fa6dd8cff5d228e201834fa1b0cd18a) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/ul26967/Projects/gcc-asan-stack-misalign/a-repro.i:481 in blake3_compress_subtree_wide =3D=3D3618=3D=3DABORTING=