mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix backtrace beyond _singtramp on macOS arm64 (#7015)
* move ptrauth_strip logic into vm_dump.c * don't use _sigtramp special logic on arm64
This commit is contained in:
parent
1876cda972
commit
ee60756495
Notes:
git
2022-12-23 17:25:14 +00:00
Merged-By: nurse <naruse@airemix.jp>
2 changed files with 17 additions and 11 deletions
|
@ -2549,15 +2549,6 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
|
|||
/* 2 is NULL + main executable */
|
||||
void **dladdr_fbases = (void **)calloc(num_traces+2, sizeof(void *));
|
||||
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
// Strip Arm64's pointer authentication.
|
||||
for (i = 0; i < num_traces; i++) {
|
||||
// I wish I could use "ptrauth_strip()" but I get an error:
|
||||
// "this target does not support pointer authentication"
|
||||
traces[i] = (void*)(((uint64_t)traces[i]) & 0x7fffffffffffull);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MAIN_EXE_PATH
|
||||
char *main_path = NULL; /* used on printing backtrace */
|
||||
ssize_t len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue