qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tcg/optimize: fix uninitialized variable


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] tcg/optimize: fix uninitialized variable
Date: Wed, 28 Feb 2024 12:19:38 +0100
User-agent: Mozilla Thunderbird

On 28/2/24 12:06, Paolo Bonzini wrote:
The variables uext_opc and sext_opc are used without initialization if
TCG_TARGET_extract_i{32,64}_valid returns false.  The result, depending
on the compiler, might be the generation of extract and sextract opcodes

Shouldn't compilers bark?

with invalid offset and count, or just random data in the TCG opcode
stream.

Fixes: ceb9ee06b71 ("tcg/optimize: Handle TCG_COND_TST{EQ,NE}", 2024-02-03)
Cc: Richard Henderson <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  tcg/optimize.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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