This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/53706] [4.8 Regression] Bootstrap failure due to "Invalid write of size 8 at 0xBDC35E: variable_htab_free (var-tracking.c:1418)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53706

--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-06-21 07:33:34 UTC ---
Patch that fixes all valgrind issues, but I have no idea if it is OK or not:

--cut here--
Index: var-tracking.c
===================================================================
--- var-tracking.c      (revision 188848)
+++ var-tracking.c      (working copy)
@@ -9126,11 +9126,7 @@ vt_emit_notes (void)
   dataflow_set_destroy (&cur);

   if (MAY_HAVE_DEBUG_INSNS)
-    {
-      free_alloc_pool (loc_exp_dep_pool);
-      loc_exp_dep_pool = NULL;
-      htab_delete (dropped_values);
-    }
+    htab_delete (dropped_values);

   emit_notes = false;
 }
@@ -9797,6 +9793,8 @@ vt_finalize (void)

   if (MAY_HAVE_DEBUG_INSNS)
     {
+      free_alloc_pool (loc_exp_dep_pool);
+      loc_exp_dep_pool = NULL;
       free_alloc_pool (valvar_pool);
       VEC_free (rtx, heap, preserved_values);
       cselib_finish ();
--cut here--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]