about summary refs log tree commit diff homepage
path: root/lib/Core/Executor.cpp
diff options
context:
space:
mode:
authorTimotej Kapus <timotej.kapus13@imperial.ac.uk>2017-12-13 17:37:16 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-17 15:38:14 +0100
commit8bec949fc84d8fe8dacbf38ff123b404f1eb4737 (patch)
tree2d703f77babe6ff009574049e9d01757453a4ed1 /lib/Core/Executor.cpp
parent8fe14b1041f39b61cdb43c32840f3d2cb97cc110 (diff)
downloadklee-8bec949fc84d8fe8dacbf38ff123b404f1eb4737.tar.gz
Add support for concretizing symbolic objects passed to external functions
Diffstat (limited to 'lib/Core/Executor.cpp')
-rw-r--r--lib/Core/Executor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 4fd94dd4..1e1a142b 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -3024,6 +3024,12 @@ void Executor::callExternalFunction(ExecutionState &state,
       assert(success && "FIXME: Unhandled solver failure");
       (void) success;
       ce->toMemory(&args[wordIndex]);
+      ObjectPair op;
+      // Checking to see if the argument is a pointer to something
+      if (ce->getWidth() == Context::get().getPointerWidth() &&
+          state.addressSpace.resolveOne(ce, op)) {
+        op.second->flushToConcreteStore(solver, state);
+      }
       wordIndex += (ce->getWidth()+63)/64;
     } else {
       ref<Expr> arg = toUnique(state, *ai);