1 // RUN: %clangxx -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
2 // RUN: %clangxx_cfi_diag -g %s -o %t %ld_flags_rpath_exe
3 // RUN: %run %t 2>&1 | FileCheck %s
6 // UNSUPPORTED: target={{.*windows-msvc.*}}
25 return (void *)(new B());
32 int main(int argc
, char *argv
[]) {
34 // CHECK: runtime error: control flow integrity check for type 'A' failed during cast to unrelated type
35 // CHECK: invalid vtable
36 // CHECK: check failed in {{.*}}, vtable located in {{.*}}libtarget_uninstrumented.cpp.dynamic.so
38 memset(p
, 0, sizeof(A
));
40 // CHECK: runtime error: control flow integrity check for type 'A' failed during cast to unrelated type
41 // CHECK: invalid vtable
42 // CHECK: check failed in {{.*}}, vtable located in (unknown)
45 fprintf(stderr
, "done %p\n", a
);