On Fri, Feb 28, 2025 at 1:38 PM Richard Henderson <
richard.hender...@linaro.org> wrote:

> On 2/28/25 13:23, Patrick Venture wrote:
> > From: Peter Foley <pefo...@google.com>
> >
> > e.g.
> >    Uninitialized value was created by an allocation of 'host_pc' in the
> stack frame
> >    #0 0xaaaac07df87c in tb_gen_code
> third_party/qemu/accel/tcg/translate-all.c:297:5
> >
> > Signed-off-by: Peter Foley <pefo...@google.com>
> > Signed-off-by: Patrick Venture <vent...@google.com>
> > ---
> >   accel/tcg/translate-all.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> > index d4189c7386..f584055a15 100644
> > --- a/accel/tcg/translate-all.c
> > +++ b/accel/tcg/translate-all.c
> > @@ -298,7 +298,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
> >       tcg_insn_unit *gen_code_buf;
> >       int gen_code_size, search_size, max_insns;
> >       int64_t ti;
> > -    void *host_pc;
> > +    void *host_pc = NULL;
> >
> >       assert_memory_lock();
> >       qemu_thread_jit_write();
>
> False positive, because the error return exits without using the
> uninitialized value.
> But if we do want to "fix" this, do it at the beginning of
> get_page_addr_code_hostp.
>

Acknowledged.  Gotta hate false positives, although better aggressive than
not. Thanks!


>
> r~
>

Reply via email to