public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jcmvbkbc at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/107482] New: out-of-bounds heap access in IRA
Date: Mon, 31 Oct 2022 20:53:50 +0000	[thread overview]
Message-ID: <bug-107482-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107482

            Bug ID: 107482
           Summary: out-of-bounds heap access in IRA
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcmvbkbc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 53806
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53806&action=edit
_gcov.i

Inside the functions update_costs_from_allocno and
assign_hard_reg the macro ALLOCNO_COLOR_DATA
may be applied to objects of type 'struct ira_allocno' whose
add_data field wasn't changed in the function color_pass to
point to a memory area sized for struct allocno_color_data.

It triggers ASAN and can be reproduced without ASAN with the attached
patch on a compiler built from revision gcc-13-3563-gf36bba013361
for target=microblazeel-linux-gnu:

$ gcc/cc1 -O2 _gcov.i
../../../../gcc/libgcc/libgcov-driver.c: In function ‘gcov_do_dump.constprop’:
../../../../gcc/libgcc/libgcov-driver.c:704:1: internal compiler error: in
assign_hard_reg, at ira-color.cc:2006

             reply	other threads:[~2022-10-31 20:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 20:53 jcmvbkbc at gcc dot gnu.org [this message]
2022-10-31 20:55 ` [Bug middle-end/107482] " jcmvbkbc at gcc dot gnu.org
2022-10-31 21:39 ` [Bug rtl-optimization/107482] " jcmvbkbc at gcc dot gnu.org
2022-10-31 21:54 ` pinskia at gcc dot gnu.org
2022-11-01  2:58 ` jcmvbkbc at gcc dot gnu.org
2022-11-03 11:58 ` jcmvbkbc at gcc dot gnu.org
2022-11-03 15:58 ` [Bug rtl-optimization/107482] [10/11/12/13 Regression] out-of-bounds heap access in IRA since r6-3496-g86f0bef37378a0 pinskia at gcc dot gnu.org
2022-11-05 10:32 ` rguenth at gcc dot gnu.org
2022-11-08  9:30 ` cvs-commit at gcc dot gnu.org
2022-11-21 11:59 ` [Bug rtl-optimization/107482] [10/11/12 " jakub at gcc dot gnu.org
2022-11-21 12:29 ` marxin at gcc dot gnu.org
2022-11-29  3:42 ` cvs-commit at gcc dot gnu.org
2022-11-29  3:46 ` cvs-commit at gcc dot gnu.org
2022-11-29  3:47 ` cvs-commit at gcc dot gnu.org
2022-11-29  3:49 ` jcmvbkbc 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-107482-4@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: link
Be 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).