From 0cbae4a7a23c0faf9c1e14ebd07e7b137b9b6792 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 2 Jun 2017 17:07:37 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-inline-analysis.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 (); } -- 2.30.2