blob: 1ccff177ca9f9124d2eba4fe9cbd97d2604f6ca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// RUN: %clang %s -S -emit-llvm -g -c -o %t.ll
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t.ll
// KLEE just must not fail
#include "klee/klee.h"
#include <stdlib.h>
int main() {
char i;
char *p;
char *q;
klee_make_symbolic(&i, sizeof(i), "i");
klee_make_symbolic(&p, sizeof(p), "p");
if (i) {}
q = malloc(sizeof (char));
klee_assume(p == q);
klee_make_symbolic(p, sizeof (char), "p[0]");
char condition = (*p);
if (*p) condition = 1;
klee_prefer_cex(&i, condition);
if (i+5) {}
return 0;
}
|