summaryrefslogtreecommitdiff
path: root/dbg_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 15:51:40 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 15:51:40 +0200
commitf4549e6f616d1b976126e1afddde3fb15c88bb08 (patch)
tree468562a9464cbbf6d0218650b15bd54926f6660b /dbg_mlc.c
parentcab07051b9609b90d82db8c4586988a804a25264 (diff)
gc6.3 tarball importgc6_3
Diffstat (limited to 'dbg_mlc.c')
-rw-r--r--dbg_mlc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/dbg_mlc.c b/dbg_mlc.c
index 9daa0b0..aacbb7a 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -818,7 +818,15 @@ GC_PTR p;
uncollectable = TRUE;
}
# endif
- if (uncollectable) GC_free(base);
+ if (uncollectable) {
+ GC_free(base);
+ } else {
+ size_t i;
+ size_t obj_sz = hhdr -> hb_sz - BYTES_TO_WORDS(sizeof(oh));
+
+ for (i = 0; i < obj_sz; ++i) ((word *)p)[i] = 0xdeadbeef;
+ GC_ASSERT((word *)p + i == (word *)base + hhdr -> hb_sz);
+ }
} /* !GC_find_leak */
}