diff options
Diffstat (limited to 'libguile/gc.c')
-rw-r--r-- | libguile/gc.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |