diff options
author | Martin Liska <mliska@suse.cz> | 2015-03-18 15:16:59 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2015-03-18 14:16:59 +0000 |
commit | 1aec2ecce4085a664f489e7a3585d993a9939a1d (patch) | |
tree | 55ccb9f54b9b5fe403b7d176c43d8c3cb574bce6 /gcc/cgraph.c | |
parent | faf4220c7236e48607dd8e286f7f555489d3dbef (diff) | |
download | gcc-1aec2ecce4085a664f489e7a3585d993a9939a1d.zip gcc-1aec2ecce4085a664f489e7a3585d993a9939a1d.tar.gz gcc-1aec2ecce4085a664f489e7a3585d993a9939a1d.tar.bz2 |
re PR ipa/65432 (Invalid read of size 1: ipa_icf::sem_item_optimizer::merge_classes(unsigned int) (ipa-icf.c:2958))
Fix PR ipa/65432
PR ipa/65432
* cgraph.c (cgraph_node::get_create): Remove unnecessary
xstrdup_for_dump wrapper.
* ipa-icf.c (sem_item::dump): Use symtab_node::name instead of
sem_item::name.
(sem_function::equals): Wrap symtab_node::name and symtab_node::asm_name
with xstrdup_for_dump.
(sem_variable::equals): Likewise.
(sem_item_optimizer::read_section): Use symtab_node::name instead of
sem_item::name.
(sem_item_optimizer::parse_funcs_and_vars): Likewise.
(sem_item_optimizer::merge_classes): Wrap symtab_node::name and
symtab_node::asm_name with xstrdup_for_dump.
(congruence_class::dump): Use symtab_node::name instead of
sem_item::name.
* ipa-icf.h (symtab_node::name): Remove.
(symtab_node::asm_name): Likewise.
From-SVN: r221491
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ede58bf..e2958c4 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -553,12 +553,11 @@ cgraph_node::get_create (tree decl) if (dump_file) fprintf (dump_file, "Introduced new external node " "(%s/%i) and turned into root of the clone tree.\n", - xstrdup_for_dump (node->name ()), node->order); + node->name (), node->order); } else if (dump_file) fprintf (dump_file, "Introduced new external node " - "(%s/%i).\n", xstrdup_for_dump (node->name ()), - node->order); + "(%s/%i).\n", node->name (), node->order); return node; } |