From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5AD073858C50; Thu, 11 Apr 2024 19:18:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AD073858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712863137; bh=9OjvwfgxcsPw17/iWZ/7xQVVwM7yTttLxqScl5+Pk00=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZkW5Y1bXHPR1/8hUrB+WPIg5iQ9dbacB4ryCYe8PbTfcNhi7dCSvFGvOWUPtxkJD6 DOUAQl8s+fgqS/28CYRT3O/Tk7gosBwwkXm9Y3pVVABeGS6PTqYbmO2mD3tzXPZLPb ogspyYfhaJl9CnVoDLJZRUh+7JTvBwftNYtcbIW8= From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114698] [12/13/14 regression] dcfldd produces wrong sha256 sum on ppc64le and -O3 since r12-5244-g64f3e71c302b4a Date: Thu, 11 Apr 2024 19:18:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: WAITING 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=3D114698 --- Comment #8 from Peter Bergner --- (In reply to Andrew Pinski from comment #6) > Note this implementation of sha2.c is shared all over the place it seems = and > has this known issue ... (In reply to Andrew Pinski from comment #4) > (In reply to Andrew Pinski from comment #3) > > uint8_t buffer[SHA256_BLOCK_LENGTH]; > >=20 > > W256 =3D (sha2_word32*)context->buffer; > >=20 > > This is starting to smell like the code is violating strict aliasing ru= les > > ... >=20 > The patch in https://github.com/NetBSD/pkgsrc/issues/122 applies direct= ly > here too. Thanks for the pointer, I'll try the patch and report back. Jan's commit d= oes seem to make a change in the alias handling, so it very well could have exp= osed that type of problem in the sha2 routine.=