[libc++] Remove HIDE_FROM_ABI from virtual functions
_LIBCPP_HIDE_FROM_ABI (which is what _LIBCPP_INLINE_VISIBILITY is) uses ABI tags to avoid ODR violations when linking together object files compiled against different versions of libc++. However, pointer authentication uses the mangled name of the function to sign the function pointer in the vtable, which means that the ABI tag effectively changes how the pointers are signed. This leads to PAC failures when passing an object that holds one of these pointers in its vtable across an ABI boundary: one side will sign the pointer using one function mangling (with one ABI tag), and the other side will authenticate the pointer expecting it to have a different mangled name, which won't work. To make sure this does not regress in the future, this patch also adds a clang-query test to detect incorrect applications of _LIBCPP_HIDE_FROM_ABI. Differential Revision: https://reviews.llvm.org/D140453
Loading
Please sign in to comment