This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24310] New: ipa-inline dump reads from freed memory resulting in a corrupt dump file
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2005 15:37:46 -0000
- Subject: [Bug c++/24310] New: ipa-inline dump reads from freed memory resulting in a corrupt dump file
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Due to a design-mistake in the cxx_printable_name print ring buffer, we print
out freed strings at ipa-inline.c:cgraph_decide_inlining_of_small_functions
fprintf (dump_file,
"\nConsidering %s with %i insns to be inlined into %s\n"
" Estimated growth after inlined into all callees is %+i
insns.\n"
" Estimated badness is %i.\n",
cgraph_node_name (edge->callee),
edge->callee->global.insns,
cgraph_node_name (edge->caller),
cgraph_estimate_growth (edge->callee),
cgraph_edge_badness (edge));
where cgraph_node_name calls back to the langhook which is implemented
by cxx_printable_name.
The print ring buffer should by design guarantee PRINT_RING_SIZE live
strings.
Remember we could be ICEing on this.
--
Summary: ipa-inline dump reads from freed memory resulting in a
corrupt dump file
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, patch
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24310