From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129060 invoked by alias); 16 Mar 2015 11:26:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 128992 invoked by uid 48); 16 Mar 2015 11:26:44 -0000 From: "juergen.reuter at desy dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59198] [4.8/4.9/5 Regression] ICE on cyclically dependent polymorphic types Date: Mon, 16 Mar 2015 11:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: juergen.reuter at desy dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.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 X-SW-Source: 2015-03/txt/msg01573.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59198 --- Comment #21 from J=C3=BCrgen Reuter --- (In reply to Paul Thomas from comment #20) > Patch posted last night: https://gcc.gnu.org/ml/fortran/2015-03/msg00069.= html >=20 > A somewhat better version might emerge tonight now that I understand bett= er > what was happening. >=20 > Thanks for your patience on this one Juergen! As you were aware, I kept > coming back to it but did not have much joy until yesterday because I was > sniffing around the wrong symptoms. >=20 > Cheers >=20 > Paul Paul, no worries, we were able to find a workaround in our code, so the iss= ue was not too pressing. But thanks for looking into it! >>From gcc-bugs-return-480430-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 16 11:27:13 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 3758 invoked by alias); 16 Mar 2015 11:27:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 3699 invoked by uid 48); 16 Mar 2015 11:27:09 -0000 From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/65435] New: UBsan runtime error reports in OpenSSL aes_core.c Date: Mon, 16 Mar 2015 11:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01574.txt.bz2 Content-length: 1658 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65435 Bug ID: 65435 Summary: UBsan runtime error reports in OpenSSL aes_core.c Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: bernd.edlinger at hotmail dot de CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Hi, I am not quite sure if this is a bug in OpenSSL or in UBSan. This gets reported by ubsan in OpenSSL 1.0.0m 5 Jun 2014: aes_core.c:1144:30: runtime error: left shift of 136 by 24 places cannot be represented in type 'int' aes_core.c:1151:30: runtime error: left shift of 158 by 24 places cannot be represented in type 'int' aes_core.c:1137:30: runtime error: left shift of 239 by 24 places cannot be represented in type 'int' aes_core.c:1130:30: runtime error: left shift of 139 by 24 places cannot be represented in type 'int' when I look at that lines, I see the following (repeated 4 times): s0 = (Td4[(t0 >> 24) ] << 24) ^ (Td4[(t3 >> 16) & 0xff] << 16) ^ (Td4[(t2 >> 8) & 0xff] << 8) ^ (Td4[(t1 ) & 0xff]) ^ rk[0]; and static const u8 Td4[256] = { 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U, ... I assume u8 means unsigned char. So are we correct to convert u8 to int before << 24, or should it be u8 to unsigned int before << 24, what OpenSSL apparently expects?