From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 80F773858C62; Thu, 4 Apr 2024 17:54:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80F773858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712253251; bh=wiLkcNHDeqCnREg43HI1WfOIBP/GRh+BUrKiRF9tEBs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mzq5waiBQP8IEmYAi6cBzTBYdbMPX2YD045iDfnU3NW2gxfUrsdH/CGmxYXSepFGz QjXmzfZr0kYEF5yIm/3HfMyDAhdF0DIJhMt1Jdqf0HaOjQ2iGGmohripKwOzCYoXeD sQDW/lLfJNu31rlSymopE2IPR83YFGp6tx95CVpQ= From: "wilco at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110773] [Aarch64] crash (SIGBUS) due to atomic instructions on under-aligned memory Date: Thu, 04 Apr 2024 17:54:11 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: wilco at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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=3D110773 --- Comment #8 from Wilco --- (In reply to Sainan from comment #7) > (In reply to Wilco from comment #6) > > That does not make any sense. The only thing I think might happen is th= at > > your structure is not correctly aligned (for example by using a custom > > memory allocator). Can you check the address of count when it fails? (s= hould > > be in the crash logs, or you can see it in gdb or just printf it). >=20 > I feel silly for not thinking of printing the address, but now that I did= , I > see the final hexit is '9' and so it just so happens this CPU can't deal > with that... So it's unaligned then, and that's not supported. And you're lucky your specific alignment happens to work on v8.4 cores - it would fail for other offsets.=