adjust unwind loop to be robust to noop-unwind-steps that would otherwise result in infinite unwind loops

This commit is contained in:
Ryan Fleury
2024-06-17 12:14:10 -07:00
parent 6ad94978ce
commit 749821dd27
3 changed files with 8 additions and 8 deletions
+2 -1
View File
@@ -2624,7 +2624,8 @@ ctrl_unwind_from_thread(Arena *arena, CTRL_EntityStore *store, CTRL_MachineID ma
unwind.flags |= step.flags;
if(step.flags & CTRL_UnwindFlag_Error ||
regs_rsp_from_arch_block(arch, regs_block) == 0 ||
regs_rip_from_arch_block(arch, regs_block) == 0)
regs_rip_from_arch_block(arch, regs_block) == 0 ||
regs_rip_from_arch_block(arch, regs_block) == rip)
{
break;
}