about summary refs log tree commit diff homepage
path: root/test/regression/2008-03-04-free-of-global.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/2008-03-04-free-of-global.c')
-rw-r--r--test/regression/2008-03-04-free-of-global.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/regression/2008-03-04-free-of-global.c b/test/regression/2008-03-04-free-of-global.c
new file mode 100644
index 00000000..7821398d
--- /dev/null
+++ b/test/regression/2008-03-04-free-of-global.c
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
+// RUN: %klee %t1.bc
+// RUN: test -f klee-last/test000001.free.err
+
+int buf[4];
+
+int main() {
+  free(buf); // this should give runtime error, not crash
+  return 0;
+}