[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/12] translate-all: fix uninitialized tb->orig_tb
From: |
Richard Henderson |
Subject: |
[PULL 11/12] translate-all: fix uninitialized tb->orig_tb |
Date: |
Fri, 25 Oct 2019 10:21:58 -0400 |
From: Clement Deschamps <address@hidden>
This fixes a segmentation fault in icount mode when executing
from an IO region.
TB is marked as CF_NOCACHE but tb->orig_tb is not initialized
(equals previous value in code_gen_buffer).
The issue happens in cpu_io_recompile() when it tries to invalidate orig_tb.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Clement Deschamps <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
accel/tcg/translate-all.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 66d4bc4341..f9b7ba159d 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1722,6 +1722,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
tb->cs_base = cs_base;
tb->flags = flags;
tb->cflags = cflags;
+ tb->orig_tb = NULL;
tb->trace_vcpu_dstate = *cpu->trace_dstate;
tcg_ctx->tb_cflags = cflags;
tb_overflow:
--
2.17.1
- [PULL 01/12] tci: Add implementation for INDEX_op_ld16u_i64, (continued)
- [PULL 01/12] tci: Add implementation for INDEX_op_ld16u_i64, Richard Henderson, 2019/10/25
- [PULL 03/12] cpu: use ROUND_UP() to define xxx_PAGE_ALIGN, Richard Henderson, 2019/10/25
- [PULL 02/12] cputlb: ensure _cmmu helper functions follow the naming standard, Richard Henderson, 2019/10/25
- [PULL 04/12] exec: Split out variable page size support to exec-vary.c, Richard Henderson, 2019/10/25
- [PULL 05/12] configure: Detect compiler support for __attribute__((alias)), Richard Henderson, 2019/10/25
- [PULL 06/12] exec: Use const alias for TARGET_PAGE_BITS_VARY, Richard Henderson, 2019/10/25
- [PULL 07/12] exec: Restrict TARGET_PAGE_BITS_VARY assert to CONFIG_DEBUG_TCG, Richard Henderson, 2019/10/25
- [PULL 08/12] exec: Promote TARGET_PAGE_MASK to target_long, Richard Henderson, 2019/10/25
- [PULL 10/12] cputlb: Fix tlb_vaddr_to_host, Richard Henderson, 2019/10/25
- [PULL 09/12] exec: Cache TARGET_PAGE_MASK for TARGET_PAGE_BITS_VARY, Richard Henderson, 2019/10/25
- [PULL 11/12] translate-all: fix uninitialized tb->orig_tb,
Richard Henderson <=
- [PULL 12/12] translate-all: Remove tb_alloc, Richard Henderson, 2019/10/25
- Re: [PULL 00/12] tcg patch queue, Peter Maydell, 2019/10/25
- Re: [PULL 00/12] tcg patch queue, no-reply, 2019/10/26