diff --git a/ChangeLog b/ChangeLog index dcf9f06af..0c74054d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-12 Alexandre Duret-Lutz + + Fix segfault with g++-3.3. + + * src/tgbaalgos/minimize.cc (minimize_dfa): Fix deletion of the + state_set_map. It led to a crash when compiled with g++-3.3. + 2011-01-12 Alexandre Duret-Lutz Fix a compilation failure with g++-3.3. diff --git a/src/tgbaalgos/minimize.cc b/src/tgbaalgos/minimize.cc index 342b0e806..16dcfb9a2 100644 --- a/src/tgbaalgos/minimize.cc +++ b/src/tgbaalgos/minimize.cc @@ -477,8 +477,11 @@ namespace spot // Free all the allocated memory. delete final_copy; hash_map::iterator hit; - for (hit = state_set_map.begin(); hit != state_set_map.end(); ++hit) - delete hit->first; + for (hit = state_set_map.begin(); hit != state_set_map.end();) + { + hash_map::iterator old = hit++; + delete old->first; + } std::list::iterator it; for (it = done.begin(); it != done.end(); ++it) delete *it;