From 29c23f5e2985ed21fc310d1f8c2a5b683bc70a00 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 1 Dec 2025 19:04:03 +0000 Subject: [PATCH] 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. --- src/goto-symex/goto_symex_state.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/goto-symex/goto_symex_state.h b/src/goto-symex/goto_symex_state.h index 96020d5970e..50a507cf1ac 100644 --- a/src/goto-symex/goto_symex_state.h +++ b/src/goto-symex/goto_symex_state.h @@ -68,7 +68,7 @@ class goto_symex_statet final : public goto_statet // Manager is required to be able to resize the thread vector guard_managert &guard_manager; - symex_target_equationt *symex_target; + symex_target_equationt *symex_target = nullptr; symex_level1t level1; @@ -217,14 +217,14 @@ class goto_symex_statet final : public goto_statet goto_programt::const_targett saved_target; /// \brief This state is saved, with the PC pointing to the target of a GOTO - bool has_saved_jump_target; + bool has_saved_jump_target = false; /// \brief This state is saved, with the PC pointing to the next instruction /// of a GOTO - bool has_saved_next_instruction; + bool has_saved_next_instruction = false; /// \brief Should the additional validation checks be run? - bool run_validation_checks; + bool run_validation_checks = false; unsigned total_vccs = 0; unsigned remaining_vccs = 0;