Skip to content

Commit

Permalink
Add static to inline statement, Fix #45181 (#17)
Browse files Browse the repository at this point in the history
Just inline meant the symbol did not get compiled so we got an undefined reference error.
  • Loading branch information
NHDaly authored and d-netto committed May 23, 2023
1 parent 2949d08 commit 1380bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stackwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1380bf5

Please sign in to comment.