File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ _LIBCPP_HIDE_FROM_ABI bool __is_function_overridden(_Ret (*__fptr)(_Args...)) no
116116 uintptr_t __end = reinterpret_cast <uintptr_t >(&__stop___lcxx_override);
117117 uintptr_t __ptr = reinterpret_cast <uintptr_t >(__fptr);
118118
119+ # if __has_feature(ptrauth_calls)
120+ // We must pass a void* to ptrauth_strip since it only accepts a pointer type. Also, in particular,
121+ // we must NOT pass a function pointer, otherwise we will strip the function pointer, and then attempt
122+ // to authenticate and re-sign it when casting it to a uintptr_t again, which will fail because we just
123+ // stripped the function pointer.
124+ __ptr = reinterpret_cast <uintptr_t >(ptrauth_strip (reinterpret_cast <void *>(__ptr), ptrauth_key_function_pointer));
125+ # endif
126+
119127 return __ptr < __start || __ptr > __end;
120128}
121129_LIBCPP_END_NAMESPACE_STD
You can’t perform that action at this time.
0 commit comments