blob: d73b6076aab6166985ce1d87566f9f03719b503f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
// RUN: %klee --exit-on-error %t1.bc
// RUN: klee-bout-tool klee-last/test000001.bout | grep -F 'Hi\x00\x00'
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
int main() {
char buf[4];
klee_make_symbolic(buf, sizeof buf);
klee_prefer_cex(buf, buf[0]=='H');
klee_prefer_cex(buf, buf[1]=='i');
klee_prefer_cex(buf, buf[2]=='\0');
return 0;
}
|