diff options
author | Jiri Slaby <jslaby@suse.cz> | 2016-07-22 13:47:07 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-08-04 14:52:17 +0200 |
commit | bd7e31b6b6ffb5e267af403007d5b8012fdec397 (patch) | |
tree | e9658f7e091ca9609a847daf66d1f01a69300bf8 /test | |
parent | 3966e9e03ac03cf0a2e5b19218f4cbd818e69df1 (diff) | |
download | klee-bd7e31b6b6ffb5e267af403007d5b8012fdec397.tar.gz |
klee: add exit-on-error-type parameter
It allows stopping the execution on some conditions like assertions. The use is like: klee -exit-on-error-type=Assert -exit-on-error-type=External file.llvm This is especially useful in the SV-COMP. A test to cover the new parameter was added too. Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'test')
-rw-r--r-- | test/Feature/ExitOnErrorType.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Feature/ExitOnErrorType.c b/test/Feature/ExitOnErrorType.c new file mode 100644 index 00000000..a68a92e0 --- /dev/null +++ b/test/Feature/ExitOnErrorType.c @@ -0,0 +1,15 @@ +// RUN: %llvmgcc %s -g -emit-llvm -O0 -c -o %t1.bc +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out -exit-on-error-type Assert %t1.bc 2>&1 + +#include <assert.h> +#include <klee/klee.h> + +int main() { + assert(klee_int("assert")); + + while (1) { + } + + return 0; +} |