qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/1] tricore: fixed faulty conditions for extr and imask


From: Richard Henderson
Subject: Re: [PATCH 0/1] tricore: fixed faulty conditions for extr and imask
Date: Wed, 10 Feb 2021 11:02:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 2/10/21 12:26 AM, David Brenken wrote:
> From: Andreas Konopik <andreas.konopik@efs-auto.de>
> 
> Hello together,
> 
> we have fixed a few conditions leading to incorrect intermediate code
> generation. RCPW_IMASK, RRPW_EXTR, RRPW_EXTR_U and RRPW_IMASK invoke
> undefined behavior for "pos + width > 32", which is also checked in
> tcg_gen_extract_tl(). RRRW_EXTR_U invokes undefined behavior for
> "width == 0", hence we removed that condition.

This is incorrect, because "undefined behavior" should not include a qemu abort.

You could raise a guest exception, you could treat the faulty instruction as a
nop, you could truncate the inputs to avoid the abort, you could write
0xdeadbeef to the destination.

Or you could fix the couple of faulty conditions and leave the rest of the code
as-is.


r~



reply via email to

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