make valgrind understand our memory pools

Annotate pools with valgrind macros so that it detects errors in pool
usage. Typically, we wish valgrind to detect a leak when the user fails
to call proper deallocation function.

* spot/misc/fixpool.hh, spot/misc/mspool.hh: here
* configure.ac: ensure that valgrind header exists
* tests/Makefile.am, tests/core/mempool.cc, tests/core/mempool.test,
  tests/core/.gitignore: add tests to ensure valgrind accurately detects
  leaks
This commit is contained in:
Maximilien Colange 2016-12-03 11:44:14 +01:00
parent b7e77743db
commit 3fe74f1cb9
7 changed files with 234 additions and 10 deletions

View file

@ -81,6 +81,7 @@ check_PROGRAMS = \
core/ltl2text \
core/ltlrel \
core/lunabbrev \
core/mempool \
core/nequals \
core/nenoform \
core/ngraph \
@ -112,6 +113,7 @@ core_ikwiad_SOURCES = core/ikwiad.cc
core_intvcomp_SOURCES = core/intvcomp.cc
core_intvcmp2_SOURCES = core/intvcmp2.cc
core_kripkecat_SOURCES = core/kripkecat.cc
core_mempool_SOURCES = core/mempool.cc
core_ngraph_SOURCES = core/ngraph.cc
core_randtgba_SOURCES = core/randtgba.cc
core_taatgba_SOURCES = core/taatgba.cc
@ -186,6 +188,7 @@ TESTS_tl = \
core/eventuniv.test \
core/stutter-ltl.test \
core/hierarchy.test \
core/mempool.test \
core/format.test
TESTS_graph = \