core: strip the PAC out of IP during backtrace on AArch64 macOS
Apple's libunwind for AArch64 returns the Instruction Pointer with the Pointer Authentication Codes (bits 47-63) even though Tarantool is compiled for arm64 (not arm64e) architecture, so we have to strip them out [1]. Although there is the ptrauth_strip macro for this purpose, it works only if compilation target is arm64e (not arm64) [2]. 1. https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication#3042105 2. https://github.com/dotnet/runtime/issues/42955#issuecomment-886910180 Closes #8074 Closes tarantool/tarantool-qa#308 Closes tarantool/tarantool-qa#309 NO_DOC=bugfix (cherry picked from commit 88990e2f)
Showing
- changelogs/unreleased/gh-8074-fix-backtraces-on-m1-macs.md 4 additions, 0 deletionschangelogs/unreleased/gh-8074-fix-backtraces-on-m1-macs.md
- src/lib/core/backtrace.c 7 additions, 0 deletionssrc/lib/core/backtrace.c
- test/app-luatest/fiber_parent_backtrace_test.lua 0 additions, 2 deletionstest/app-luatest/fiber_parent_backtrace_test.lua
- test/app/fiber.skipcond 0 additions, 4 deletionstest/app/fiber.skipcond
Please register or sign in to comment