blob: 0fa10e8b7e2e5babe4b83b5bd1891c0ddb772f2a (
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
27
|
// REQUIRES: not-asan
// RUN: %llvmgcc %s -emit-llvm -O0 -g -c -o %t.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee -output-dir=%t.klee-out %t.bc 2>&1 | FileCheck %s
// CHECK: failed external call: strdup
// CHECK: failed external call: strdup
// objective: check handling of more than one failing external call
#include "klee/klee.h"
#include <stdbool.h>
#include <string.h>
int main(int argc, char * argv[]) {
bool b;
klee_make_symbolic(&b, sizeof(bool), "b");
char * s0;
if (b) {
s0 = strdup((char *) 0xdeadbeef);
} else {
s0 = strdup((void *) 0xdeafbee5);
}
(void) s0;
}
|