On 3/3/25 08:40, Peter Foley wrote:
And interestingly enough, it appears that execution continues even with early return from
get_page_addr_code_hostp:
https://gitlab.com/qemu-project/qemu/-/blob/master/accel/tcg/translate-all.c?
ref_type=heads#L308 <https://gitlab.com/qemu-project/qemu/-/blob/master/accel/tcg/
translate-all.c?ref_type=heads#L308>
Yes, but without using the hostp value.
Which implies that we could still have an uninitialized value here:
https://gitlab.com/qemu-project/qemu/-/blob/master/accel/tcg/translate-all.c?
ref_type=heads#L362 <https://gitlab.com/qemu-project/qemu/-/blob/master/accel/tcg/
translate-all.c?ref_type=heads#L362>
Passed through several layers of functions, but still unused.
Eventually, we reach
https://gitlab.com/qemu-project/qemu/-/blob/master/accel/tcg/translator.c#L257
which again checks the -1 error return, skips the use of the cached host_pc (now named
host_addr).
Again, I'm open to unconditional initialized value, but doing so in
get_page_addr_code_hostp, not tb_gen_code.
r~