diff mbox series

[v2,16/16] replay: report sync error when no exception in log (!DEBUG INVESTIGATION)

Message ID 20231211091346.14616-17-alex.bennee@linaro.org
State New
Headers show
Series record/replay fixes: attempting to get avocado green | expand

Commit Message

Alex Bennée Dec. 11, 2023, 9:13 a.m. UTC
If replay_exception returns false we can only trigger an exit from the
main loop and hope something unwinds to something we can process. This
seems to be the point where execution diverges in the replay_linux
tests case.

DISCUSSION: Maybe this should be tightened up to check the remaining
instruction count?

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 replay/replay.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/replay/replay.c b/replay/replay.c
index 665dbb34fb..d283c1353d 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -209,11 +209,12 @@  bool replay_exception(void)
         return true;
     } else if (replay_mode == REPLAY_MODE_PLAY) {
         g_assert(replay_mutex_locked());
-        bool res = replay_has_exception();
-        if (res) {
+        if (replay_has_exception()) {
             replay_finish_event();
+            return true;
+        } else {
+            replay_sync_error("Exception not in log");
         }
-        return res;
     }
 
     return true;