diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-26 00:42:44 -0500 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-26 00:42:44 -0500 |
commit | 2f8a289f854cb8c9f8640b67f5071024a7f6333b (patch) | |
tree | 8e19f4d222ce347daec5d7c3c12f6445f9e6c756 /gc.c | |
parent | 863a20f1045b761ac65d7051bcca47e4eb01c81d (diff) | |
download | txr-2f8a289f854cb8c9f8640b67f5071024a7f6333b.tar.gz txr-2f8a289f854cb8c9f8640b67f5071024a7f6333b.tar.bz2 txr-2f8a289f854cb8c9f8640b67f5071024a7f6333b.zip |
* gc.c (mark_mem_region): Bugfix: do not mess with the valgrind
accessibility of the heap object if valgrind debugging is not enabled.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -301,14 +301,16 @@ static void mark_mem_region(val *low, val *high) #endif if (in_heap(maybe_obj)) { #ifdef HAVE_VALGRIND - VALGRIND_MAKE_MEM_DEFINED(maybe_obj, sizeof *maybe_obj); + if (opt_vg_debug) + VALGRIND_MAKE_MEM_DEFINED(maybe_obj, sizeof *maybe_obj); #endif type_t t = maybe_obj->t.type; if ((t & FREE) == 0) { mark_obj(maybe_obj); } else { #ifdef HAVE_VALGRIND - VALGRIND_MAKE_MEM_NOACCESS(maybe_obj, sizeof *maybe_obj); + if (opt_vg_debug) + VALGRIND_MAKE_MEM_NOACCESS(maybe_obj, sizeof *maybe_obj); #endif } } |