[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v14 23/25] replay: fix replay shutdown
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [PATCH v14 23/25] replay: fix replay shutdown |
Date: |
Fri, 15 Mar 2019 15:10:29 +0300 |
User-agent: |
StGit/0.17.1-dirty |
This patch fixes shutdown of the replay process, which is terminated with
the assert when shutdown event is read from the log.
replay_finish_event reads new data_kind and therefore the value of data_kind
should be preserved to be valid at qemu_system_shutdown_request call.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
replay/replay.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/replay/replay.c b/replay/replay.c
index e578958659..8f2e17c8cb 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -49,14 +49,14 @@ bool replay_next_event_is(int event)
}
while (true) {
- if (event == replay_state.data_kind) {
+ unsigned int data_kind = replay_state.data_kind;
+ if (event == data_kind) {
res = true;
}
- switch (replay_state.data_kind) {
+ switch (data_kind) {
case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST:
replay_finish_event();
- qemu_system_shutdown_request(replay_state.data_kind -
- EVENT_SHUTDOWN);
+ qemu_system_shutdown_request(data_kind - EVENT_SHUTDOWN);
break;
default:
/* clock, time_t, checkpoint and other events */
- [Qemu-devel] [PATCH v14 00/25] Fixing record/replay and adding reverse debugging, Pavel Dovgalyuk, 2019/03/15
- Re: [Qemu-devel] [PATCH v14 00/25] Fixing record/replay and adding reverse debugging, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 22/25] util/qemu-timer: refactor deadline calculation for external timers, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 23/25] replay: fix replay shutdown,
Pavel Dovgalyuk <=
- [Qemu-devel] [PATCH v14 25/25] icount: clean up cpu_can_io before jumping to the next block, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 13/25] replay: implement replay-seek command, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 14/25] replay: refine replay-time module, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 06/25] replay: finish record/replay before closing the disks, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 21/25] replay: document development rules, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 10/25] qapi: introduce replay.json for record/replay-related stuff, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 09/25] replay: provide an accessor for rr filename, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 18/25] replay: describe reverse debugging in docs/replay.txt, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 15/25] replay: flush rr queue before loading the vmstate, Pavel Dovgalyuk, 2019/03/15
- [Qemu-devel] [PATCH v14 04/25] replay: update docs for record/replay with block devices, Pavel Dovgalyuk, 2019/03/15