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 target/97535] [9/10 Regression] On AArch64 memcpy expansion cannot handle length > 32-bit signed int max Date: Tue, 17 Nov 2020 10:25:39 +0000 [thread overview] Message-ID: <bug-97535-4-YR3bWdGNAx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97535-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97535 --- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>: https://gcc.gnu.org/g:9d65095e72502c12903e202cfe2e1fc58140522a commit r9-9052-g9d65095e72502c12903e202cfe2e1fc58140522a Author: Tamar Christina <tamar.christina@arm.com> Date: Tue Oct 27 16:30:31 2020 +0000 AArch64: Fix overflow in memcopy expansion on aarch64. Currently the inline memcpy expansion code for AArch64 is using a signed int to hold the number of elements to copy. When you giver give it a value larger than INT_MAX it will overflow. The overflow causes the maximum number of instructions we want to expand to check to fail since this assumes an unsigned number. This patch changes the maximum isns arithmetic to be unsigned HOST_WIDE_INT. note that the calculation *must* remained signed as the memcopy issues overlapping unaligned copies. This means the pointer must be moved back and so you need signed arithmetic. gcc/ChangeLog: PR target/97535 * config/aarch64/aarch64.c (aarch64_expand_cpymem): Use unsigned arithmetic in check. gcc/testsuite/ChangeLog: PR target/97535 * gcc.target/aarch64/pr97535.c: New test. (cherry picked from commit 0f801e0b6cc9f67c9a8983127e23161f6025c5b6)
next prev parent reply other threads:[~2020-11-17 10:25 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-23 0:54 [Bug rtl-optimization/97535] New: ICE when building xmrig on AArch64 icenowy at aosc dot io 2020-10-23 2:06 ` [Bug rtl-optimization/97535] On AArch64 memcpy expansion cannot handle length > 32-bit signed int max icenowy at aosc dot io 2020-10-23 7:47 ` marxin at gcc dot gnu.org 2020-10-23 8:07 ` icenowy at aosc dot io 2020-10-23 9:42 ` [Bug rtl-optimization/97535] [9/10/11 Regression] " tnfchris at gcc dot gnu.org 2020-10-27 16:59 ` [Bug target/97535] " cvs-commit at gcc dot gnu.org 2020-10-27 17:15 ` [Bug target/97535] [9/10 " tnfchris at gcc dot gnu.org 2020-10-28 19:14 ` cvs-commit at gcc dot gnu.org 2020-11-09 15:02 ` rguenth at gcc dot gnu.org 2020-11-17 10:20 ` cvs-commit at gcc dot gnu.org 2020-11-17 10:25 ` cvs-commit at gcc dot gnu.org [this message] 2020-11-17 10:25 ` cvs-commit at gcc dot gnu.org 2020-11-17 10:26 ` cvs-commit at gcc dot gnu.org 2020-11-17 10:31 ` tnfchris at gcc dot gnu.org 2020-11-17 10:48 ` rguenther at suse dot de 2020-11-17 10:50 ` tnfchris at gcc dot gnu.org 2020-11-17 10:50 ` tnfchris at gcc dot gnu.org 2020-11-17 12:53 ` cvs-commit at gcc dot gnu.org 2020-11-17 12:55 ` tnfchris 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-97535-4-YR3bWdGNAx@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).