blob: cdd2ef35e84950a4c1c6c4b1e91d96766bcb1cdb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// RUN: %clang %s -emit-llvm %O0opt -c -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t1.bc
#include "klee/klee.h"
#include <stdlib.h>
int main() {
// concrete case
void *p = malloc(0);
free(p);
p = malloc(0);
void *arr[4] = { p, 0, 0, 0 };
// symbolic case
free(arr[klee_range(0, 4, "range")]);
}
|