Commit c8925994 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix two memory leak reported by Sonali Dutta.

* src/tgbatest/ltl2tgba.cc: Calling tgbatest/ltl2tgba -M -O (which
makes no sense, but that is no reason) used the "minimized" variable
for two automata, overwriting one.
* wrap/python/spot.i: The python bindings did not know about
sba_explicit automata, causing memory leaks, and complaints from the
bdd_dict.
parent 30e05412
......@@ -1167,10 +1167,11 @@ main(int argc, char** argv)
}
}
const spot::tgba* monitor = 0;
if (opt_monitor)
{
tm.start("Monitor minimization");
minimized = a = minimize_monitor(a);
monitor = a = minimize_monitor(a);
tm.stop("Monitor minimization");
assume_sba = false; // All states are accepting, so double
// circles in the dot output are
......@@ -1620,6 +1621,7 @@ main(int argc, char** argv)
delete product_to_free;
delete system;
delete expl;
delete monitor;
delete minimized;
delete degeneralized;
delete aut_scc;
......
......@@ -238,7 +238,7 @@ using namespace spot;
%template(explicit_string_tgba)
spot::tgba_explicit<state_explicit_string>;
%template(explicit__number_tgba)
%template(explicit_number_tgba)
spot::tgba_explicit<state_explicit_number>;
%template(explicit_formula_tgba)
spot::tgba_explicit<state_explicit_formula>;
......@@ -253,6 +253,30 @@ using namespace spot;
spot::explicit_conf<tgba_explicit<state_explicit_formula>,
state_explicit_formula>;
%template(explicit_graph__string_sba)
spot::explicit_graph<state_explicit_string, sba>;
%template(explicit_graph__number_sba)
spot::explicit_graph<state_explicit_number, sba>;
%template(explicit_graph__formula_sba)
spot::explicit_graph<state_explicit_formula, sba>;
%template(explicit_string_sba)
spot::sba_explicit<state_explicit_string>;
%template(explicit_number_sba)
spot::sba_explicit<state_explicit_number>;
%template(explicit_formula_sba)
spot::sba_explicit<state_explicit_formula>;
%template(explicit_string__sba)
spot::explicit_conf<sba_explicit<state_explicit_string>,
state_explicit_string>;
%template(explicit_number__sba)
spot::explicit_conf<sba_explicit<state_explicit_number>,
state_explicit_number>;
%template(explicit_formula__sba)
spot::explicit_conf<sba_explicit<state_explicit_formula>,
state_explicit_formula>;
%include "tgbaalgos/degen.hh"
%include "tgbaalgos/dottydec.hh"
%include "tgbaalgos/dotty.hh"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment