OSDN Git Service

target/arm: Make sure that commpage's tb->size != 0
authorIlya Leoshkevich <iii@linux.ibm.com>
Fri, 16 Apr 2021 15:49:37 +0000 (17:49 +0200)
committerCornelia Huck <cohuck@redhat.com>
Thu, 20 May 2021 12:19:30 +0000 (14:19 +0200)
commit48a130923c59b706e7f33527490028eb8a86b97e
tree201ad2431068b68a02713cad19ebadce4cff35a2
parent86131c71b13257e095d8c4f4453d52cbc6553c07
target/arm: Make sure that commpage's tb->size != 0

tb_gen_code() assumes that tb->size must never be zero, otherwise it
may produce spurious exceptions. For ARM this may happen when creating
a translation block for the commpage.

Fix by pretending that commpage translation blocks have at least one
instruction.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210416154939.32404-3-iii@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/arm/translate.c