Skip to content

Strip authentication bits from vtable load address #71128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,17 @@ llvm::Expected<LanguageRuntime::VTableInfo>
"failed to get the address of the value");

Status error;
const lldb::addr_t vtable_load_addr =
lldb::addr_t vtable_load_addr =
process->ReadPointerFromMemory(original_ptr, error);

if (!error.Success() || vtable_load_addr == LLDB_INVALID_ADDRESS)
return llvm::createStringError(std::errc::invalid_argument,
"failed to read vtable pointer from memory at 0x%" PRIx64,
original_ptr);
;

// The vtable load address can have authentication bits with
// AArch64 targets on Darwin.
vtable_load_addr = process->FixDataAddress(vtable_load_addr);

// Find the symbol that contains the "vtable_load_addr" address
Address vtable_addr;
Expand Down