Committed to branch dmalcolm/jit:

I tracked down the crash in dwarf2out.c mentioned in the commit message
for 6e624036e3f47c6ca4ae2e99974b74aa29f11eca:
"base_types" wasn't being flushed between invocations, leading to it
containing garbage that might be collected (it's not GTY-labelled), and
duplicate copies of types that appeared to violate reference-counting
checking in the DWARF string pruner, due to multiple copies of the
string "__unknown__".

Release it.

With this commit, *almost* all of the test suite runs successfully at
optimization level 3, the exception being a crash in test-linked-list.c
that I've yet to figure out.

gcc/
        * dwarf2out.c (dwarf2out_c_finalize): Release base_types.
---
 gcc/ChangeLog.jit | 4 ++++
 gcc/dwarf2out.c   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.jit b/gcc/ChangeLog.jit
index 0e35180..5c14fcc 100644
--- a/gcc/ChangeLog.jit
+++ b/gcc/ChangeLog.jit
@@ -1,3 +1,7 @@
+2014-03-11  David Malcolm  <dmalc...@redhat.com>
+
+       * dwarf2out.c (dwarf2out_c_finalize): Release base_types.
+
 2014-03-10  David Malcolm  <dmalc...@redhat.com>
 
        * ipa-reference.c (ipa_init): Move static bool init_p from here
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index e9d230d..fd262f2 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -24326,7 +24326,7 @@ void dwarf2out_c_finalize (void)
   generic_type_instances = NULL;
   frame_pointer_fb_offset = 0;
   frame_pointer_fb_offset_valid = false;
-  //base_types = NULL;
+  base_types.release ();
 }
 
 #include "gt-dwarf2out.h"
-- 
1.7.11.7

Reply via email to