* gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
authorNeil Jerram <neil@ossau.uklinux.net>
Tue, 6 Dec 2005 19:15:16 +0000 (19:15 +0000)
committerNeil Jerram <neil@ossau.uklinux.net>
Tue, 6 Dec 2005 19:15:16 +0000 (19:15 +0000)
This was typically hit when running `gc-live-object-stats' right
after starting Guile.

libguile/ChangeLog
libguile/gc-card.c

index 98e1b07..0474355 100644 (file)
@@ -1,3 +1,9 @@
+2005-12-06  Ludovic Courtès  <ludovic.courtes@laas.fr>
+
+       * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
+       This was typically hit when running `gc-live-object-stats' right
+       after starting Guile.
+
 2005-11-30  Kevin Ryde  <user42@zip.com.au>
 
        * srfi-13.c (scm_string_append_shared): No copying if just one
index 02b3a13..b979899 100644 (file)
@@ -306,6 +306,10 @@ scm_i_card_statistics (scm_t_cell *p, SCM hashtab, scm_t_heap_segment *seg)
   int span = seg->span;
   int offset = SCM_MAX (SCM_GC_CARD_N_HEADER_CELLS, span);
 
+  if (!bitvec)
+    /* Card P hasn't been initialized yet by `scm_i_init_card_freelist ()'. */
+    return;
+
   for (p += offset; p < end; p += span, offset += span)
     {
       scm_t_bits tag = -1;