qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translatio


From: David Hildenbrand
Subject: Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation
Date: Wed, 14 Apr 2021 16:48:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 14.04.21 15:41, Ilya Leoshkevich wrote:
If arch-specific code generates a translation block of size 0,
tb_gen_code() may generate a spurious exception. Add an assertion in
order to catch such situations early.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
  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 ba6ab09790..93b2dae112 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1913,6 +1913,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
tcg_ctx->cpu = env_cpu(env);
      gen_intermediate_code(cpu, tb, max_insns);
+    assert(tb->size != 0);
      tcg_ctx->cpu = NULL;
      max_insns = tb->icount;

Did you double-check the xtensa issue?

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]