Skip to content

Commit 54c12b0

Browse files
committed
Initialise all POD members of goto_symex_statet
The constructor did not take care of them and our unit tests exposed that, at least within unit tests, we were accessing uninitialised members.
1 parent 65d8860 commit 54c12b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/goto-symex/goto_symex_state.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class goto_symex_statet final : public goto_statet
6868

6969
// Manager is required to be able to resize the thread vector
7070
guard_managert &guard_manager;
71-
symex_target_equationt *symex_target;
71+
symex_target_equationt *symex_target = nullptr;
7272

7373
symex_level1t level1;
7474

@@ -217,14 +217,14 @@ class goto_symex_statet final : public goto_statet
217217
goto_programt::const_targett saved_target;
218218

219219
/// \brief This state is saved, with the PC pointing to the target of a GOTO
220-
bool has_saved_jump_target;
220+
bool has_saved_jump_target = false;
221221

222222
/// \brief This state is saved, with the PC pointing to the next instruction
223223
/// of a GOTO
224-
bool has_saved_next_instruction;
224+
bool has_saved_next_instruction = false;
225225

226226
/// \brief Should the additional validation checks be run?
227-
bool run_validation_checks;
227+
bool run_validation_checks = false;
228228

229229
unsigned total_vccs = 0;
230230
unsigned remaining_vccs = 0;

0 commit comments

Comments
 (0)