diff options
-rw-r--r-- | libguile/ChangeLog | 5 | ||||
-rw-r--r-- | libguile/gc.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 9ad37a584..2be583b3f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de> + + * gc.c (MARK): Re-introduce a cheap sanity test for non debug + mode, as suggested by Michael Livshin. + 2001-03-31 Michael Livshin <mlivshin@bigfoot.com> * backtrace.c (display_backtrace_body): since the `print_state' diff --git a/libguile/gc.c b/libguile/gc.c index 2b0888612..020ee1ce7 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1155,10 +1155,15 @@ gc_mark_nimp: gc_mark_loop_first_time: #endif - + #if (SCM_DEBUG_CELL_ACCESSES == 1) || (defined (GUILE_DEBUG_FREELIST)) + /* We are in debug mode. Check the ptr exhaustively. */ if (!scm_cellp (ptr)) SCM_MISC_ERROR ("rogue pointer in heap", SCM_EOL); +#else + /* In non-debug mode, do at least some cheap testing. */ + if (!SCM_CELLP (ptr)) + SCM_MISC_ERROR ("rogue pointer in heap", SCM_EOL); #endif #ifndef MARK_DEPENDENCIES |