about summary refs log tree commit diff homepage
path: root/test/Merging
diff options
context:
space:
mode:
authorLukas Wölfer <lukas.woelfer@rwth-aachen.de>2018-09-23 03:12:16 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-09-30 21:45:17 +0100
commitf05935dc16bda1748d02a71cb0278fa4ec03c12b (patch)
treee8813785fd25f1c7c718900a8099baf31d5a3210 /test/Merging
parent40c1ab5c3d144cde0a513b708b6fb46f2ae1a0dd (diff)
downloadklee-f05935dc16bda1748d02a71cb0278fa4ec03c12b.tar.gz
Fix a crash when the last running state is terminated during merging
Diffstat (limited to 'test/Merging')
-rw-r--r--test/Merging/state_termination.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Merging/state_termination.c b/test/Merging/state_termination.c
new file mode 100644
index 00000000..52986f4b
--- /dev/null
+++ b/test/Merging/state_termination.c
@@ -0,0 +1,21 @@
+// RUN: %llvmgcc -emit-llvm -g -c -o %t.bc %s
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out --use-merge --debug-log-merge --search=dfs  %t.bc 
+
+#include <klee/klee.h>
+
+int main(int argc, char** args){
+
+  int x;
+
+  char str[5];
+  klee_make_symbolic(str, sizeof(str), "str");
+  char *s = str;
+
+  klee_open_merge();
+  while(*s != 's')
+      s++;
+  klee_close_merge();
+
+  return 0;
+}