Fix occasional crash of CTRL-C during DWARF read in.
	* dwarf2read.c (dwarf2_mark_helper): Return on NULL CU.
This commit is contained in:
Jan Kratochvil 2011-07-12 20:59:03 +00:00
parent 10915d9a18
commit d07ed419cf
2 changed files with 12 additions and 0 deletions

View 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-11 Tom Tromey <tromey@redhat.com>
* regcache.c (struct regcache_descr): Fix typo.

View File

@ -15455,6 +15455,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;