From f72fc9d43c1659224e0986a6a8fa3d0349eedd14 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 23 May 2018 11:14:44 +0300 Subject: [PATCH] Fix staticroots and trace tests for MANUAL_VDB * tests/staticrootslib.c (mktree): Call GC_end_stubborn_change() at the end of function if GC_NEW() was called. * tests/trace_test.c (mktree): Likewise. --- tests/staticrootslib.c | 2 ++ tests/trace_test.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/staticrootslib.c b/tests/staticrootslib.c index 9ba6d353..a445a095 100644 --- a/tests/staticrootslib.c +++ b/tests/staticrootslib.c @@ -39,6 +39,8 @@ static struct treenode *root_nz[10] = { (struct treenode *)(GC_word)2 }; if (r) { r -> x = libsrl_mktree(i-1); r -> y = libsrl_mktree(i-1); + if (i != 1) + GC_end_stubborn_change(r); } return r; } diff --git a/tests/trace_test.c b/tests/trace_test.c index d5af8917..1bcf07bb 100644 --- a/tests/trace_test.c +++ b/tests/trace_test.c @@ -25,6 +25,8 @@ struct treenode * mktree(int i) { } r -> x = mktree(i-1); r -> y = mktree(i-1); + if (i != 1) + GC_end_stubborn_change(r); return r; } -- 2.40.0