diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-13 07:34:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-13 07:34:35 -0700 |
commit | 133f25494e54eb508a0f19c3abdcfc24ccc4c1ce (patch) | |
tree | 1911de3cf26417972c8175367f0fa408e588df57 | |
parent | 146229666d039720e5ee56d21b8e937abc23f18a (diff) | |
download | txr-133f25494e54eb508a0f19c3abdcfc24ccc4c1ce.tar.gz txr-133f25494e54eb508a0f19c3abdcfc24ccc4c1ce.tar.bz2 txr-133f25494e54eb508a0f19c3abdcfc24ccc4c1ce.zip |
gc: bug in --free-all --vg-debug combination.
* gc.c (gc_free_all): Mark defined the current block being
iterated, not the next one. Otherwise Valgrind generates
numerous false errors from accesses to free objects in the
first block. Not to mention that next is a null pointer in
the last iteration.
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -998,7 +998,7 @@ void gc_free_all(void) #if HAVE_VALGRIND if (opt_vg_debug) - VALGRIND_MAKE_MEM_DEFINED(&next->block, sizeof next->block); + VALGRIND_MAKE_MEM_DEFINED(&iter->block, sizeof iter->block); #endif for (block = iter->block, end = iter->block + HEAP_SIZE; |