Skip to content
Snippets Groups Projects
Commit f689befd authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Cornelia Huck
Browse files

target/xtensa: Make sure that tb->size != 0


tb_gen_code() assumes that tb->size must never be zero, otherwise it
may produce spurious exceptions. For xtensa this may happen when
decoding an unknown instruction, when handling a write into the
CCOUNT or CCOMPARE special register and when single-stepping the first
instruction of an exception handler.

Fix by pretending that the size of the respective translation block is
1 in all these cases.

Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Tested-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Message-Id: <20210416154939.32404-4-iii@linux.ibm.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 48a13092
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment