about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-05-25 09:42:42 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-05-25 09:42:42 +0000
commit0957ad0803f472bcb2dc8a5f64aa5583d1d2c6fe (patch)
treec64172b958330d19b1588b04df9e1eb0b7d1c5a5 /lib/Core
parent461594277fe53d64ab89b02856232276916379d6 (diff)
downloadklee-0957ad0803f472bcb2dc8a5f64aa5583d1d2c6fe.tar.gz
Patch by Paul Marinescu that makes KLEE gracefully fail on assembly code.
Includes test case.



git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@157463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 917a746d..c6bd379a 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1592,6 +1592,10 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
     if (f && isDebugIntrinsic(f, kmodule))
       break;
 
+    if (isa<InlineAsm>(fp)) {
+      terminateStateOnExecError(state, "inline assembly is unsupported");
+      break;
+    }
     // evaluate arguments
     std::vector< ref<Expr> > arguments;
     arguments.reserve(numArgs);
@@ -1633,9 +1637,6 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
             
           i++;
         }
-      } else if (isa<InlineAsm>(fp)) {
-        terminateStateOnExecError(state, "inline assembly is unsupported");
-        break;
       }
 
       executeCall(state, ki, f, arguments);