summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-04-12 09:05:05 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-04-12 09:05:05 +0300
commit64b64cb11b22326854b7ece195cb23d5b90d19d6 (patch)
treed86213b1181b936314dd83c379706bea6a4052ca /tests
parent09dd6a62b7ef8cd3d519599ad5e0c67d000fc1fe (diff)
downloadbdwgc-64b64cb11b22326854b7ece195cb23d5b90d19d6.tar.gz
Fix missing update of collectable_count in mktree of gctest
(fix of commit 673f0cf3f) Issue #256 (bdwgc). * tests/gctest.c [!GC_NO_FINALIZATION] (mktree): Increment collectable_count after GC_NEW(void*).
Diffstat (limited to 'tests')
-rw-r--r--tests/gctest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/gctest.c b/tests/gctest.c
index bcd8d5ed..0cca5fc7 100644
--- a/tests/gctest.c
+++ b/tests/gctest.c
@@ -935,6 +935,7 @@ tn * mktree(int n)
# endif
CHECK_OUT_OF_MEMORY(new_link);
+ AO_fetch_and_add1(&collectable_count);
{
FINALIZER_LOCK();
/* Losing a count here causes erroneous report of failure. */