Skip to content

Commit

Permalink
Fix reference counting in Z3_mk_fpa_to_ieee_bv
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph M. Wintersteiger committed Nov 6, 2020
1 parent 30fd01b commit 372bb4b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/api/api_fpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ extern "C" {
if (biased) {
exp = mpfm.is_zero(val) ? 0 :
mpfm.is_inf(val) ? mpfm.mk_top_exp(ebits) :
mpfm.bias_exp(ebits, mpfm.exp(val));
mpfm.bias_exp(ebits, mpfm.exp(val));
}
else {
exp = mpfm.is_zero(val) ? 0 :
Expand Down Expand Up @@ -1200,8 +1200,9 @@ extern "C" {
RETURN_Z3(nullptr);
}
api::context * ctx = mk_c(c);
Z3_ast r = of_ast(ctx->fpautil().mk_to_ieee_bv(to_expr(t)));
RETURN_Z3(r);
expr * r = ctx->fpautil().mk_to_ieee_bv(to_expr(t));
ctx->save_ast_trail(r);
RETURN_Z3(of_expr(r));
Z3_CATCH_RETURN(nullptr);
}

Expand Down

0 comments on commit 372bb4b

Please sign in to comment.