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