aboutsummaryrefslogtreecommitdiff
path: root/c_emulator/traploop_detector.cpp
AgeCommit message (Collapse)AuthorFilesLines
2026-04-17Tweak trap loop detector heuristic. (#1666)Prashanth Mundkur1-15/+24
The previous heuristic did not suffice for a few ACT4 tests where the trap count grew slowly but steadily over the xret count. Adjust by introducing an instruction retired callback and resetting the loop detector when a sufficient number of instructions have retired since the last trap. This still catches tight trap loops but allows the above tests to complete successfully. --------- Co-authored-by: Alex Richardson <alexrichardson@google.com>
2026-04-14Detect potentially infinite trap loops. (#1656)Prashanth Mundkur1-0/+40
This helps in automated tested environments where an infinite loop caused by a failing test can cause issues. An `xret_callback` is used in combination with the existing `trap_callback` to detect trap loops. The `trap_callback` is now called after the state changes due to the trap are visible.