Skip to content

Commit be2f5ca

Browse files
[lldb] Call FixDataAddress when following Swift async chain
The code comparing async context addresses need to strip any pointer authentication bits, otherwise the integer comparison will always fail.
1 parent 2c318f1 commit be2f5ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/source/Target/StackID.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ bool lldb_private::operator!=(const StackID &lhs, const StackID &rhs) {
8383
static llvm::Expected<bool> IsReachableParent(lldb::addr_t source,
8484
lldb::addr_t maybe_parent,
8585
Process &process) {
86+
maybe_parent = process.FixDataAddress(maybe_parent);
8687
auto max_num_frames = 512;
8788
for (lldb::addr_t parent_ctx = source; parent_ctx && max_num_frames;
8889
max_num_frames--) {
@@ -94,7 +95,7 @@ static llvm::Expected<bool> IsReachableParent(lldb::addr_t source,
9495
return llvm::createStringError(llvm::formatv(
9596
"Failed to read parent async context of: {0:x}. Error: {1}",
9697
old_parent_ctx, error.AsCString()));
97-
if (parent_ctx == maybe_parent)
98+
if (process.FixDataAddress(parent_ctx) == maybe_parent)
9899
return true;
99100
}
100101
if (max_num_frames == 0)

0 commit comments

Comments
 (0)