From f21fa3d966f7951a1d598d2d5fc6120afe6612f8 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 12 Dec 2015 03:09:38 +0800 Subject: [PATCH] do not flush TB when l1_map is uninitialized. this fixes issue #280, #284 --- qemu/translate-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/translate-all.c b/qemu/translate-all.c index 2e1acb1a..088e7b40 100644 --- a/qemu/translate-all.c +++ b/qemu/translate-all.c @@ -807,6 +807,9 @@ static void page_flush_tb(struct uc_struct *uc) { int i; + if (uc->l1_map == NULL) + return; + for (i = 0; i < V_L1_SIZE; i++) { page_flush_tb_1(V_L1_SHIFT / V_L2_BITS - 1, uc->l1_map + i); }