From bd7e31b6b6ffb5e267af403007d5b8012fdec397 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 22 Jul 2016 13:47:07 +0200 Subject: 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 --- test/Feature/ExitOnErrorType.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/Feature/ExitOnErrorType.c (limited to 'test') 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 +#include + +int main() { + assert(klee_int("assert")); + + while (1) { + } + + return 0; +} -- cgit 1.4.1