Skip to content

Commit

Permalink
Merge pull request #1425 from bugsnag/PLAT-6059-empty-trace
Browse files Browse the repository at this point in the history
[PLAT-6059] Fix empty traces in some edge cases
  • Loading branch information
kstenerud committed Jul 6, 2022
2 parents 6f7061d + ea8c157 commit 2f4011d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ int bsg_ksbt_backtraceThreadState(
const uintptr_t framePtr = bsg_ksmachframePointer(machineContext);
if (framePtr == 0 || bsg_ksmachcopyMem((void *)framePtr, &frame,
sizeof(frame)) != KERN_SUCCESS) {
return 0;
return i;
}
for (int j = 1; j < skipEntries; j++) {
if (frame.previous == 0 ||
bsg_ksmachcopyMem(frame.previous, &frame, sizeof(frame)) !=
KERN_SUCCESS) {
return 0;
return i;
}
}

Expand Down

0 comments on commit 2f4011d

Please sign in to comment.