Fix segfault in free_growth_caches (PR jit/80954)

gcc/ChangeLog:
	PR jit/80954
	* ipa-inline-analysis.c (free_growth_caches): Set
	edge_removal_hook_holder to NULL after removing it.

From-SVN: r248841
This commit is contained in:
David Malcolm 2017-06-02 17:07:37 +00:00 committed by David Malcolm
parent 38a75ccc89
commit 0cbae4a7a2
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2017-06-02 David Malcolm <dmalcolm@redhat.com>
PR jit/80954
* ipa-inline-analysis.c (free_growth_caches): Set
edge_removal_hook_holder to NULL after removing it.
2017-06-02 Sudakshina Das <sudi.das@arm.com>
* config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for

View File

@ -110,7 +110,10 @@ void
free_growth_caches (void)
{
if (edge_removal_hook_holder)
symtab->remove_edge_removal_hook (edge_removal_hook_holder);
{
symtab->remove_edge_removal_hook (edge_removal_hook_holder);
edge_removal_hook_holder = NULL;
}
edge_growth_cache.release ();
}