Skip to content

Commit f134631

Browse files
authored
Merge pull request #6670 from jasonmolenda/r108068497-dont-hardcode-addressing-bits-on-darwin
Remove hardcoded address bits in ABIMacOS_arm64
2 parents 32d4d40 + d1e1d7a commit f134631

File tree

5 files changed

+5
-266
lines changed

5 files changed

+5
-266
lines changed

lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -816,15 +816,12 @@ ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl(
816816

817817
lldb::addr_t ABIMacOSX_arm64::FixAddress(addr_t pc, addr_t mask) {
818818
lldb::addr_t pac_sign_extension = 0x0080000000000000ULL;
819-
// Darwin systems originally couldn't determine the proper value
820-
// dynamically, so the most common value was hardcoded. This has
821-
// largely been cleaned up, but there are still a handful of
822-
// environments that assume the default value is set to this value
823-
// and there's no dynamic value to correct it.
824-
// When no mask is specified, set it to 39 bits of addressing (0..38).
819+
// When no mask is specified, clear/set the top byte; preserve
820+
// the low 55 bits (00..54) for addressing and bit 55 to indicate
821+
// sign.
825822
if (mask == 0) {
826-
// ~((1ULL<<39)-1)
827-
mask = 0xffffff8000000000;
823+
// ~((1ULL<<55)-1)
824+
mask = 0xff80000000000000;
828825
}
829826
return (pc & pac_sign_extension) ? pc | mask : pc & (~mask);
830827
}

lldb/test/API/macosx/corefile-default-ptrauth/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

lldb/test/API/macosx/corefile-default-ptrauth/TestCorefileDefaultPtrauth.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

lldb/test/API/macosx/corefile-default-ptrauth/create-corefile.c

Lines changed: 0 additions & 189 deletions
This file was deleted.

lldb/test/API/macosx/corefile-default-ptrauth/main.c

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)