From c9aadba9107ad4a6abaa2b2539c47adac2d2b810 Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Mon, 13 Sep 2021 10:33:09 +0200 Subject: tools/klee: Warn if module and host target triples differ ... as running a bitcode with a different target triple may result in unexpected crashes or assertion violations. --- test/Feature/TargetMismatch.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/Feature/TargetMismatch.c (limited to 'test/Feature') diff --git a/test/Feature/TargetMismatch.c b/test/Feature/TargetMismatch.c new file mode 100644 index 00000000..aae7fda6 --- /dev/null +++ b/test/Feature/TargetMismatch.c @@ -0,0 +1,9 @@ +// REQUIRES: not-darwin +// RUN: %clang %s -m32 -emit-llvm %O0opt -c -o %t1.bc +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --exit-on-error > %t2.out 2>&1 || true +// RUN: FileCheck %s -input-file=%t2.out + +// CHECK: KLEE: WARNING: Module and host target triples do not match +// CHECK-NEXT: This may cause unexpected crashes or assertion violations. +int main(void) {} -- cgit 1.4.1