We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 85b08cd + 8689cf8 commit 0ec5600Copy full SHA for 0ec5600
tools/swift-inspect/Sources/SymbolicationShims/SymbolicationShims.h
@@ -12,6 +12,7 @@
12
13
#if defined(__APPLE__)
14
15
+#include <mach/vm_param.h>
16
#include <stdint.h>
17
#include <ptrauth.h>
18
@@ -26,6 +27,10 @@ struct Range {
26
27
static inline uintptr_t GetPtrauthMask(void) {
28
#if __has_feature(ptrauth_calls)
29
return (uintptr_t)ptrauth_strip((void*)0x0007ffffffffffff, 0);
30
+#elif __arm64__ && __LP64__
31
+ // Mask all bits above the top of MACH_VM_MAX_ADDRESS, which will
32
+ // match the above ptrauth_strip.
33
+ return (uintptr_t)~0ull >> __builtin_clzll(MACH_VM_MAX_ADDRESS);
34
#else
35
return (uintptr_t)~0ull;
36
#endif
0 commit comments