From d3788f489f0df2ab0c675e2ce98d77297b5ce93c Mon Sep 17 00:00:00 2001 From: NHDaly Date: Mon, 22 May 2023 16:02:27 -0600 Subject: [PATCH] Add static to inline statement, Fix #45181 Just inline meant the symbol did not get compiled so we got an undefined reference error. --- src/stackwalk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stackwalk.c b/src/stackwalk.c index b09d41319f93f..55e3b7b69df03 100644 --- a/src/stackwalk.c +++ b/src/stackwalk.c @@ -789,7 +789,7 @@ _os_tsd_get_direct(unsigned long slot) // Unconditionally defined ptrauth_strip (instead of using the ptrauth.h header) // since libsystem will likely be compiled with -mbranch-protection, and we currently are not. // code from https://github.com/llvm/llvm-project/blob/7714e0317520207572168388f22012dd9e152e9e/compiler-rt/lib/sanitizer_common/sanitizer_ptrauth.h -inline uint64_t ptrauth_strip(uint64_t __value, unsigned int __key) { +static inline uint64_t ptrauth_strip(uint64_t __value, unsigned int __key) { // On the stack the link register is protected with Pointer // Authentication Code when compiled with -mbranch-protection. // Let's strip the PAC unconditionally because xpaclri is in the NOP space,