diff --git a/ChangeLog b/ChangeLog index 7e463d32e..4d8898d91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-01-21 Alexandre Duret-Lutz + + Fix a memory leak in Cou99 statistics. + + * src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::acss_states): + Delete the iterator after using it. + * src/tgbatest/emptchkr.test: Run 'randtgba -z' with valgrind too. + 2010-01-21 Alexandre Duret-Lutz Fix a longstanding bug in our implementation of GV04. diff --git a/src/tgbaalgos/gtec/ce.cc b/src/tgbaalgos/gtec/ce.cc index 8c4f56d4c..1e7638f6b 100644 --- a/src/tgbaalgos/gtec/ce.cc +++ b/src/tgbaalgos/gtec/ce.cc @@ -1,6 +1,8 @@ // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. +// Copyright (C) 2010 Laboratoire de Recherche et Développement de +// l'Epita (LRDE). // // This file is part of Spot, a model checking library. // @@ -92,6 +94,7 @@ namespace spot for (i->first(); !i->done(); i->next()) if (i->get_index() >= scc_root) ++count; + delete i; return count; } diff --git a/src/tgbatest/emptchkr.test b/src/tgbatest/emptchkr.test index 0fb982622..569953fe6 100755 --- a/src/tgbatest/emptchkr.test +++ b/src/tgbatest/emptchkr.test @@ -1,7 +1,9 @@ #!/bin/sh -# Copyright (C) 2004, 2009 Laboratoire d'Informatique de Paris 6 (LIP6), +# Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), # département Systèmes Répartis Coopératifs (SRC), Université Pierre # et Marie Curie. +# Copyright (C) 2009, 2010 Laboratoire de Recherche de Développement de +# l'Epita (LRDE). # # This file is part of Spot, a model checking library. # @@ -29,6 +31,9 @@ set -e # With no acceptance condition, everyone should agree and find a run. # Do not spend to much time checking this. run 0 ../randtgba -e 10 -s 0 -r -m +# Test some statistic output +run 0 ../randtgba -z -e 10 -s 0 -r -m +run 0 ../randtgba -1 -e 10 -s 0 -r -m # One acceptance condition run 0 ../randtgba -e 100 -s 0 -r -m -a 1 0.1 -d 0.01