From 7ee405c0c792aef83435a2a6fc0a10734f47ba97 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Sun, 8 Apr 2012 23:46:46 +0000 Subject: Fixed --max-stp-time, which wasn't working unless --use-forked-stp was also used. Thanks to Paul Marinescu for reporting and debugging this. The patch also disables the STP timeout by default. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@154300 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Feature/SolverTimeout.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/Feature/SolverTimeout.c (limited to 'test/Feature/SolverTimeout.c') diff --git a/test/Feature/SolverTimeout.c b/test/Feature/SolverTimeout.c new file mode 100644 index 00000000..96f75cd7 --- /dev/null +++ b/test/Feature/SolverTimeout.c @@ -0,0 +1,15 @@ +// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc +// RUN: %klee --max-stp-time=1 %t1.bc +#include + +int main() { + long long int x, y = 102*75678 + 78, i = 101; + + klee_make_symbolic(&x, sizeof(x), "x"); + + if (x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x + (x*x % (x+12)) == y*y*y*y*y*y*y*y*y*y*y*y*y*y*y*y % i) + printf("Yes\n"); + else printf("No\n"); + + return 0; +} -- cgit 1.4.1