summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2005-12-06 19:15:16 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2005-12-06 19:15:16 +0000
commit9fb5c8f95c70a13434c127fb6a1e7538ed14b9b9 (patch)
tree0cd0af8eba675d502535b724d96cc942d48f528b
parentaa1babce68c25e7c04f4ae443fbfcfcf5f06f569 (diff)
downloadguile-9fb5c8f95c70a13434c127fb6a1e7538ed14b9b9.tar.gz
* 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.
-rw-r--r--libguile/ChangeLog6
-rw-r--r--libguile/gc-card.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 98e1b0784..0474355f3 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -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
diff --git a/libguile/gc-card.c b/libguile/gc-card.c
index 02b3a1333..b97989916 100644
--- a/libguile/gc-card.c
+++ b/libguile/gc-card.c
@@ -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;