From 7b6eff6967a11a26b3989aef7d583e56df006a64 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sat, 20 Feb 2021 16:20:32 +0000 Subject: [PATCH] fix user-after-free in smt_ctx test --- src/test/smt_context.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/smt_context.cpp b/src/test/smt_context.cpp index d2ee858e5..c7bf22813 100644 --- a/src/test/smt_context.cpp +++ b/src/test/smt_context.cpp @@ -21,7 +21,9 @@ void tst_smt_context() app_ref c1(m.mk_const(symbol("c"), m.mk_bool_sort()), m); app_ref na1(m.mk_not(a1), m); ctx.assert_expr(na1); - ctx.assert_expr(m.mk_or(c1.get(), b1.get())); + + app_ref b_or_c(m.mk_or(c1.get(), b1.get()), m); + ctx.assert_expr(b_or_c); { app_ref nc(m.mk_not(c1), m);