From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9A6FC138334 for ; Fri, 20 Sep 2019 23:44:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90093E08C4; Fri, 20 Sep 2019 23:44:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 618E0E08C4 for ; Fri, 20 Sep 2019 23:44:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AC12234B439 for ; Fri, 20 Sep 2019 23:44:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 056BD4D3 for ; Fri, 20 Sep 2019 23:44:47 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1569023057.0d735eed5eb8d1e0fc7948719e682a3110193e52.slyfox@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 9.2.0/gentoo/29_all_mips_split_move-SEGV.patch 9.2.0/gentoo/README.history X-VCS-Directories: 9.2.0/gentoo/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 0d735eed5eb8d1e0fc7948719e682a3110193e52 X-VCS-Branch: master Date: Fri, 20 Sep 2019 23:44:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e78ab1a5-1525-4a6e-8c64-e14af9fd9936 X-Archives-Hash: b350bd8299d3a9003e56cac32cd86271 commit: 0d735eed5eb8d1e0fc7948719e682a3110193e52 Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Sep 20 23:44:17 2019 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Sep 20 23:44:17 2019 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0d735eed 9.2.0: backport https://gcc.gnu.org/PR91702 (ICE on mips16 code) Bug: https://gcc.gnu.org/PR91702 Signed-off-by: Sergei Trofimovich gentoo.org> 9.2.0/gentoo/29_all_mips_split_move-SEGV.patch | 47 ++++++++++++++++++++++++++ 9.2.0/gentoo/README.history | 1 + 2 files changed, 48 insertions(+) diff --git a/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch new file mode 100644 index 0000000..dc154e9 --- /dev/null +++ b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch @@ -0,0 +1,47 @@ +https://gcc.gnu.org/PR91702 + +From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001 +From: rsandifo +Date: Sun, 7 Jul 2019 09:49:14 +0000 +Subject: [PATCH] Fix uninitialised use in mips_split_move + +While testing the fix for PR91068, I hit an rtl checking failure +while building newlib. mips_split_move was decomposing an address that +happened to be symbolic and then tried to access the REGNO of the base +register field, which wasn't initialised but which by chance pointed to +valid memory. + +2019-07-07 Richard Sandiford + +gcc/ + * config/mips/mips.c (mips_split_move): Zero-initialize addr + and check whether addr.reg is nonnull before using it. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/config/mips/mips.c | 4 ++-- + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_) + can forward SRC for DEST. This is most useful if the next insn is a + simple store. */ + rtx_insn *insn = (rtx_insn *)insn_; +- struct mips_address_info addr; ++ struct mips_address_info addr = {}; + if (insn) + { + rtx_insn *next = next_nonnote_nondebug_insn_bb (insn); +@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_) + { + rtx tmp = XEXP (src, 0); + mips_classify_address (&addr, tmp, GET_MODE (tmp), true); +- if (REGNO (addr.reg) != REGNO (dest)) ++ if (addr.reg && REGNO (addr.reg) != REGNO (dest)) + validate_change (next, &SET_SRC (set), src, false); + } + else +-- +2.23.0 + diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history index 37c8298..079fbf1 100644 --- a/9.2.0/gentoo/README.history +++ b/9.2.0/gentoo/README.history @@ -1,6 +1,7 @@ 2 TODO + 27_all_sparc-PIC-constant-PR91472.patch + 28_all_sparc-fpu-subregs-91269.patch + + 29_all_mips_split_move-SEGV.patch 1 12 Aug 2019 + 01_all_default-fortify-source.patch