Skip to content

Commit

Permalink
Add static to inline statement
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
gbaraldi authored Jun 2, 2022
1 parent bd8dbc3 commit f0d0460
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 f0d0460

Please sign in to comment.