]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/cfi/target_uninstrumented.cpp
1 // RUN: %clangxx -g -DSHARED_LIB %s -fPIC -shared -o %T/target_uninstrumented-so.so
2 // RUN: %clangxx_cfi_diag -g %s -o %t %T/target_uninstrumented-so.so
3 // RUN: %t 2>&1 | FileCheck %s
24 return (void *)(new B());
31 int main(int argc
, char *argv
[]) {
33 // CHECK: runtime error: control flow integrity check for type 'A' failed during cast to unrelated type
34 // CHECK: invalid vtable in module {{.*}}target_uninstrumented-so.so
36 memset(p
, 0, sizeof(A
));
37 // CHECK: runtime error: control flow integrity check for type 'A' failed during cast to unrelated type
38 // CHECK-NOT: invalid vtable in module
39 // CHECK: invalid vtable
42 fprintf(stderr
, "done %p\n", a
);