diff --git a/compiler-rt/lib/cfi/cfi_ignorelist.txt b/compiler-rt/lib/cfi/cfi_ignorelist.txt index 4a0f03949ca8c..ae20be4a5f341 100644 --- a/compiler-rt/lib/cfi/cfi_ignorelist.txt +++ b/compiler-rt/lib/cfi/cfi_ignorelist.txt @@ -15,3 +15,7 @@ src:*xstddef # This ctor is used by std::make_shared and needs to cast to uninitialized T* # in order to call std::allocator_traits::construct. fun:_ZNSt23_Sp_counted_ptr_inplace* + +# std::make_shared use __aligned_buffer as storage, and cast to +# uninitialized T* (libstdc++) +fun:*__aligned_buffer* diff --git a/compiler-rt/test/cfi/make_shared.cpp b/compiler-rt/test/cfi/make_shared.cpp new file mode 100644 index 0000000000000..9e2a2ceeac219 --- /dev/null +++ b/compiler-rt/test/cfi/make_shared.cpp @@ -0,0 +1,11 @@ +// RUN: %clangxx_cfi %s -o %t +// RUN: %run %t + +#include + +struct Foo { + Foo() {} + virtual ~Foo() {} +}; + +int main(int argc, char **argv) { std::make_shared(); }