aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-04-30 23:34:35 +0200
committerUros Bizjak <uros@gcc.gnu.org>2012-04-30 23:34:35 +0200
commit036c01022a1cfabeaf885a6485b6f25da329ee98 (patch)
treece57d487e05cec03c2151c772f2cb79883c72c40 /gcc/tree-sra.c
parent24b2a15a832a4ada89c40badfe3742e5fe10891f (diff)
downloadgcc-036c01022a1cfabeaf885a6485b6f25da329ee98.zip
gcc-036c01022a1cfabeaf885a6485b6f25da329ee98.tar.gz
gcc-036c01022a1cfabeaf885a6485b6f25da329ee98.tar.bz2
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
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 70b241d..110990a 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -4612,8 +4612,8 @@ convert_callers_for_node (struct cgraph_node *node,
if (dump_file)
fprintf (dump_file, "Adjusting call (%i -> %i) %s -> %s\n",
cs->caller->uid, cs->callee->uid,
- cgraph_node_name (cs->caller),
- cgraph_node_name (cs->callee));
+ xstrdup (cgraph_node_name (cs->caller)),
+ xstrdup (cgraph_node_name (cs->callee)));
ipa_modify_call_arguments (cs, cs->call_stmt, adjustments);