Fix segfault in free_growth_caches (PR jit/80954)
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 2 Jun 2017 17:07:37 +0000 (17:07 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 2 Jun 2017 17:07:37 +0000 (17:07 +0000)
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
gcc/ipa-inline-analysis.c

index 070bb8f6db5e60c094cb257067547988184b4d10..308dd1a42ef78abba1d18ea21213382a2fbfb781 100644 (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
index f562ca5a4bddeeacaaea32249de2bd024bd7a96a..9f7b2a1370f902f6cb5c05d0765866217b1ebdca 100644 (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 ();
 }