From 036c01022a1cfabeaf885a6485b6f25da329ee98 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 30 Apr 2012 23:34:35 +0200 Subject: re PR middle-end/53136 (Use after free in ipa_make_edge_direct_to_target, cxx_printable_name_internal problem) PR middle-end/53136 * ipa-prop.c (ipa_print_node_jump_functions): Wrap multiple calls to cgraph_node_name in xstrdup. (ipa_make_edge_direct_to_target): Ditto. * cgraph.c (dump_cgraph_node): Ditto. * tree-sra.c (convert_callers_for_node): Ditto. * lto-symtab.c (lto_cgraph_replace_node): Ditto. * ipa-cp.c (perhaps_add_new_callers): Ditto. * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Ditto. (cgraph_materialize_all_clones): Ditto. * ipa-inline.c (report_inline_failed_reason): Ditto. (want_early_inline_function_p): Ditto. (edge_badness): Ditto. (update_edge_key): Ditto. (flatten_function): Ditto. (ipa_inline): Ditto. (inlinw_always_inline_functions): Ditto. (early_inline_small_functions): Ditto. From-SVN: r187001 --- gcc/lto-symtab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/lto-symtab.c') diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 12e1b95..a371c0a 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -215,8 +215,8 @@ lto_cgraph_replace_node (struct cgraph_node *node, { fprintf (cgraph_dump_file, "Replacing cgraph node %s/%i by %s/%i" " for symbol %s\n", - cgraph_node_name (node), node->uid, - cgraph_node_name (prevailing_node), + xstrdup (cgraph_node_name (node)), node->uid, + xstrdup (cgraph_node_name (prevailing_node)), prevailing_node->uid, IDENTIFIER_POINTER ((*targetm.asm_out.mangle_assembler_name) (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->symbol.decl))))); -- cgit v1.1