public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/redhat/heads/gcc-8-branch)] early-remat.c: Fix new/delete mismatch [PR100230] Date: Fri, 14 May 2021 14:57:08 +0000 (GMT) [thread overview] Message-ID: <20210514145708.28EC53943429@sourceware.org> (raw) https://gcc.gnu.org/g:65c5624fe5853138183064e554a301512a0764df commit 65c5624fe5853138183064e554a301512a0764df Author: Alex Coplan <alex.coplan@arm.com> Date: Fri Apr 23 14:09:15 2021 +0100 early-remat.c: Fix new/delete mismatch [PR100230] This simple patch fixes a mistmatched operator new/delete in early-remat.c which triggers ASan errors on (at least) AArch64 when compiling SVE code. gcc/ChangeLog: PR rtl-optimization/100230 * early-remat.c (early_remat::sort_candidates): Use delete[] instead of delete for array allocated with new[]. (cherry picked from commit 5d87c2251c441f056e0a44f928ffcb8a8a679b6b) Diff: --- gcc/early-remat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/early-remat.c b/gcc/early-remat.c index bba2c1a6db5..177dd424d7b 100644 --- a/gcc/early-remat.c +++ b/gcc/early-remat.c @@ -1069,7 +1069,7 @@ early_remat::sort_candidates (void) m_candidates.qsort (compare_candidates); - delete postorder_index; + delete[] postorder_index; } /* Commit to the current candidate indices and initialize cross-references. */
reply other threads:[~2021-05-14 14:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210514145708.28EC53943429@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@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).