From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 72941384AB54; Thu, 11 Apr 2024 06:53:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72941384AB54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712818412; bh=V6yasLun9VCbOsFp1zkNN0NQAw7EfQPQMZF9FE64eMc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EK8ON/2ayU7XSzyJTGax7keJ5VxyK0kbzG30kl2YyUSc5JjCSoDlsCkFkCF+OJUhp DlIIM6Jyr0vpaYTPAJtUrmEDowkhGYEm78pWTJBXzD5jM7iBbJkaScHAG5MeCLRA85 kl+nACEzBIa/NVAMg1dS6Qc8F1HMk5ddQyuH/dFc= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110027] [11/12/13/14 regression] Stack objects with extended alignments (vectors etc) misaligned on detect_stack_use_after_return Date: Thu, 11 Apr 2024 06:53:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 --- Comment #19 from Hongtao Liu --- (In reply to Jakub Jelinek from comment #17) > Both of the posted patches are incorrect, this needs to be fixed in > asan_emit_stack_protection, account for the different offsets[0] which > happens when a stack pointer guard is created. > I'll deal with it tomorrow. It seems to me that the only offend place is where I've modifed, are there other places where align_frame_offset (ASAN_RED_ZONE_SIZE) is also added? Also, your patch adds a gcc_assert for offset[0], which seems to me there w= as an assumption that offset[0] should be a multiple of alignb, thus making my patch more reasonable?=