From c2a3f2941d3c14b0ea1ce6794bbaa3cc5b709901 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 15 Nov 2022 17:50:45 +0100 Subject: [PATCH] ltl_to_tgba_fm: fix a memory leak on abort This issue surfaced in twacube.test after the previous patches. * spot/twaalgos/ltl2tgba_fm.cc: Release the formula namer on abort. * NEWS: Mention the bug. --- NEWS | 4 ++++ spot/twaalgos/ltl2tgba_fm.cc | 1 + 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index f19987c2c..a1f6267bb 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,10 @@ New in spot 2.11.2.dev (not yet released) They have been limited to 16 operands, but this value can be changed with option -x tls-max-ops=N. (Issue #521 too.) + - Running ltl_to_tgba_fm() with an output_aborter (which is done + during automata-based implication checks) would leak memory on + abort. + New in spot 2.11.2 (2022-10-26) Command-line tools: diff --git a/spot/twaalgos/ltl2tgba_fm.cc b/spot/twaalgos/ltl2tgba_fm.cc index a354aaddd..42571f00f 100644 --- a/spot/twaalgos/ltl2tgba_fm.cc +++ b/spot/twaalgos/ltl2tgba_fm.cc @@ -2031,6 +2031,7 @@ namespace spot { if (aborter && aborter->too_large(a)) { + a->release_formula_namer(namer, false); if (!simplifier) delete s; return nullptr;