]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 12 Jul 2011 21:12:56 +0000 (21:12 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 12 Jul 2011 21:12:56 +0000 (21:12 +0000)
Fix occasional crash of CTRL-C during DWARF read in.
* dwarf2read.c (dwarf2_mark_helper): Return on NULL CU.

gdb/ChangeLog
gdb/dwarf2read.c

index 1f518ca0d637adb34c1833b670a86000226ed793..d765ba7e4a427e45de83824ed70c3616044d2b46 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Fix occasional crash of CTRL-C during DWARF read in.
+       * dwarf2read.c (dwarf2_mark_helper): Return on NULL CU.
+
 2011-07-06  Joel Brobecker  <brobecker@adacore.com>
 
        * version.in: Set version to 7.2.91.20110706-cvs.
index 7a2632b79b23a2245ac68705f8ad8e205d7b6ba0..5bc9d0edc92b8b7ecdbc328086865dc1758bacce 100644 (file)
@@ -15277,6 +15277,13 @@ dwarf2_mark_helper (void **slot, void *data)
   struct dwarf2_per_cu_data *per_cu;
 
   per_cu = (struct dwarf2_per_cu_data *) *slot;
+
+  /* cu->dependencies references may not yet have been ever read if QUIT aborts
+     reading of the chain.  As such dependencies remain valid it is not much
+     useful to track and undo them during QUIT cleanups.  */
+  if (per_cu->cu == NULL)
+    return 1;
+
   if (per_cu->cu->mark)
     return 1;
   per_cu->cu->mark = 1;