accel/tcg: Assert that tb->size != 0 after translation
commit0b00b0c1e05b34904635cf1b5cfdd945d1a8475e
authorIlya Leoshkevich <iii@linux.ibm.com>
Fri, 16 Apr 2021 15:49:39 +0000 (16 17:49 +0200)
committerCornelia Huck <cohuck@redhat.com>
Thu, 20 May 2021 12:19:30 +0000 (20 14:19 +0200)
treec942c111acb61154762dab3c0084d4532a591031
parentf689befde664f917510e842660a69961faf8ba7b
accel/tcg: Assert that tb->size != 0 after translation

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>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210416154939.32404-5-iii@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
accel/tcg/translate-all.c