Skip to content

Merge stable into 5.5 #3075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 7, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
// RUN: %clangxx_asan -std=c++20 -fexceptions -O0 %s -o %t -pthread
// RUN: %run %t

// XFAIL: ios && !iossim
// longjmp from signal handler is unportable.
// XFAIL: solaris

#include <algorithm>
#include <cassert>
#include <cerrno>
Expand Down
8 changes: 8 additions & 0 deletions compiler-rt/test/asan/TestCases/zero_page_pc.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// Check that ASan correctly detects SEGV on the zero page.
// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s

#if __has_feature(ptrauth_calls)
# include <ptrauth.h>
#endif

typedef void void_f();
int main() {
void_f *func = (void_f *)0x4;
#if __has_feature(ptrauth_calls)
func = ptrauth_sign_unauthenticated(
func, ptrauth_key_function_pointer, 0);
#endif
func();
// x86 reports the SEGV with both address=4 and pc=4.
// On PowerPC64 ELFv1, the pointer is taken to be a function-descriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static const char *g_get_dynamic_class_info2_body = R"(
extern "C" {
int printf(const char * format, ...);
void free(void *ptr);
Class* objc_copyRealizedClassList(unsigned int *outCount);
Class* objc_copyRealizedClassList_nolock(unsigned int *outCount);
const char* objc_debug_class_getNameRaw(Class cls);
}

Expand All @@ -199,7 +199,7 @@ __lldb_apple_objc_v2_get_dynamic_class_info2(void *gdb_objc_realized_classes_ptr
ClassInfo *class_infos = (ClassInfo *)class_infos_ptr;

uint32_t count = 0;
Class* realized_class_list = objc_copyRealizedClassList(&count);
Class* realized_class_list = objc_copyRealizedClassList_nolock(&count);
DEBUG_PRINTF ("count = %u\n", count);

uint32_t idx = 0;
Expand Down Expand Up @@ -499,7 +499,7 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2(Process *process,
static const ConstString g_gdb_object_getClass("gdb_object_getClass");
m_has_object_getClass = HasSymbol(g_gdb_object_getClass);
static const ConstString g_objc_copyRealizedClassList(
"objc_copyRealizedClassList");
"_ZL33objc_copyRealizedClassList_nolockPj");
m_has_objc_copyRealizedClassList = HasSymbol(g_objc_copyRealizedClassList);

RegisterObjCExceptionRecognizer(process);
Expand Down