From: David Malcolm Date: Fri, 2 Jun 2017 17:07:37 +0000 (+0000) Subject: Fix segfault in free_growth_caches (PR jit/80954) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cbae4a7a23c0faf9c1e14ebd07e7b137b9b6792;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 070bb8f6db5..308dd1a42ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-06-02 David Malcolm + + 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 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index f562ca5a4bd..9f7b2a1370f 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -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 (); }