From 69190130d38bfc9b5d67add843f2c542dc843470 Mon Sep 17 00:00:00 2001 From: Lukáš Zaoral Date: Sat, 22 Jan 2022 21:27:43 +0100 Subject: Core/ExecutionState: Fix uninitialized reads in unit tests ... by initialising all members of fundamental types of the ExecutionState class. Fixes the following error in SearcherTest.{Two,}RandomPath unit tests: lib/Core/ExecutionState.cpp:114:22: runtime error: load of value 254, which is not a valid value for type 'bool' --- lib/Core/ExecutionState.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/Core/ExecutionState.cpp') diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp index 2f585f96..54fe752e 100644 --- a/lib/Core/ExecutionState.cpp +++ b/lib/Core/ExecutionState.cpp @@ -70,15 +70,8 @@ StackFrame::~StackFrame() { /***/ -ExecutionState::ExecutionState(KFunction *kf) : - pc(kf->instructions), - prevPC(pc), - depth(0), - ptreeNode(nullptr), - steppedInstructions(0), - instsSinceCovNew(0), - coveredNew(false), - forkDisabled(false) { +ExecutionState::ExecutionState(KFunction *kf) + : pc(kf->instructions), prevPC(pc) { pushFrame(nullptr, kf); setID(); } -- cgit 1.4.1