public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/100311] UB in sel-sched.c:init_regs_for_mode with -march=armv8-m.base Date: Thu, 29 Apr 2021 10:56:52 +0000 [thread overview] Message-ID: <bug-100311-4-wxHDhMKRA2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100311-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100311 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Earnshaw <rearnsha@gcc.gnu.org>: https://gcc.gnu.org/g:d0ae39ce2c3b4d635de6102ec3750cf6109cdc8d commit r10-9778-gd0ae39ce2c3b4d635de6102ec3750cf6109cdc8d Author: Richard Earnshaw <rearnsha@arm.com> Date: Wed Apr 28 17:56:38 2021 +0100 arm: fix UB due to missing mode check [PR100311] Some places in the compiler iterate over all the fixed registers to check if that register can be used in a particular mode. The idiom is to iterate over the register and then for that register, if it supports the current mode to check all that register and any additional registers needed (HARD_REGNO_NREGS). If these two checks are not fully aligned then it is possible to generate a buffer overrun when testing data objects that are sized by the number of hard regs in the machine. The VPR register is a case where these checks were not consistent and because this is the last HARD register the result was that we ended up overflowing the fixed_regs array. gcc: PR target/100311 * config/arm/arm.c (arm_hard_regno_mode_ok): Only allow VPR to be used in HImode. (cherry picked from commit 59f5d16f2c5db4d9592c8ce6453afe81334bb012)
next prev parent reply other threads:[~2021-04-29 10:56 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-28 8:37 [Bug rtl-optimization/100311] New: " acoplan at gcc dot gnu.org 2021-04-28 11:07 ` [Bug rtl-optimization/100311] " rearnsha at gcc dot gnu.org 2021-04-28 16:59 ` cvs-commit at gcc dot gnu.org 2021-04-29 10:56 ` cvs-commit at gcc dot gnu.org 2021-04-29 10:56 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-29 10:57 ` rearnsha at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100311-4-wxHDhMKRA2@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).