otf_product: fix deletion of iter_cache_

Fixes #152, reported by Valentin Iovene.

* spot/twa/twaproduct.cc (~twa_product): Delete iter_cache_.
* tests/python/otfcrash.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2016-02-16 17:22:36 +01:00
parent e86370f894
commit 3a3913cf50
4 changed files with 46 additions and 0 deletions

View file

@ -318,6 +318,10 @@ namespace spot
twa_product::~twa_product()
{
// Make sure we delete the iterator cache before erasing the two
// automata (by reference counting).
delete iter_cache_;
iter_cache_ = nullptr;
}
const state*