diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-31 22:55:27 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-31 22:55:27 +0000 |
commit | 9a6976cd27118ae22a5514346437202668318c60 (patch) | |
tree | 099fbfb875065d345aacfc552797ac244d7dbd9d /libguile | |
parent | 463b2219df03352a7e5c74e5755c6bd88988125c (diff) | |
download | guile-9a6976cd27118ae22a5514346437202668318c60.tar.gz |
* Re-introduce a cheap sanity test for non debug mode.
Diffstat (limited to 'libguile')
-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 |