about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorgladtbx <gladtbx@gmail.com>2017-03-01 15:53:54 -0600
committergladtbx <gladtbx@gmail.com>2017-03-01 15:55:44 -0600
commit923cf308465799038ce54da949a84906c45e8951 (patch)
treecdf48e224aefd73a0b38fd9d8c82cd7a9f32f8d7 /test
parent4f5ea494986689dd89f97f9a64082527557c71c9 (diff)
downloadklee-923cf308465799038ce54da949a84906c45e8951.tar.gz
fix for PathOS.id
Diffstat (limited to 'test')
-rw-r--r--test/regression/2017-02-21-pathOS-id.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/regression/2017-02-21-pathOS-id.c b/test/regression/2017-02-21-pathOS-id.c
new file mode 100644
index 00000000..d3bffbe0
--- /dev/null
+++ b/test/regression/2017-02-21-pathOS-id.c
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc %s -emit-llvm -g -O0 -c -o %t.bc
+// RUN: rm -rf %t.klee-out
+// RUN: %klee --output-dir=%t.klee-out -write-paths %t.bc 2> %t.log
+// RUN: cat %t.klee-out/test000001.path | wc -l | grep -q 1
+// RUN: cat %t.klee-out/test000002.path | wc -l | grep -q 1
+// RUN: cat %t.klee-out/test000003.path | wc -l | grep -q 1
+// RUN: cat %t.klee-out/test000004.path | wc -l | grep -q 1
+int main(){
+	int a, b;
+	klee_make_symbolic (&a, sizeof(int), "a");
+	klee_make_symbolic (&b, sizeof(int), "b");
+	klee_assume(a<2);
+	klee_assume(a>=0);
+	malloc(a);
+	if(b){
+		b++;//do something
+	}
+	return b;
+}