From 923cf308465799038ce54da949a84906c45e8951 Mon Sep 17 00:00:00 2001 From: gladtbx Date: Wed, 1 Mar 2017 15:53:54 -0600 Subject: fix for PathOS.id --- lib/Core/Executor.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index c5d294fb..f5b46fc0 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -976,14 +976,18 @@ Executor::fork(ExecutionState ¤t, ref condition, bool isInternal) { falseState->ptreeNode = res.first; trueState->ptreeNode = res.second; - if (!isInternal) { - if (pathWriter) { - falseState->pathOS = pathWriter->open(current.pathOS); + if (pathWriter) { + // Need to update the pathOS.id field of falseState, otherwise the same id + // is used for both falseState and trueState. + falseState->pathOS = pathWriter->open(current.pathOS); + if (!isInternal) { trueState->pathOS << "1"; falseState->pathOS << "0"; - } - if (symPathWriter) { - falseState->symPathOS = symPathWriter->open(current.symPathOS); + } + } + if (symPathWriter) { + falseState->symPathOS = symPathWriter->open(current.symPathOS); + if (!isInternal) { trueState->symPathOS << "1"; falseState->symPathOS << "0"; } -- cgit 1.4.1