[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fuzz: Display hexadecimal value with '0x' prefix
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] fuzz: Display hexadecimal value with '0x' prefix |
Date: |
Sat, 12 Jun 2021 18:31:13 +0200 |
On Sat, Jun 12, 2021 at 6:16 PM Laurent Vivier <laurent@vivier.eu> wrote:
>
> Le 12/06/2021 à 17:00, Philippe Mathieu-Daudé a écrit :
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > tests/qtest/fuzz/generic_fuzz.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/qtest/fuzz/generic_fuzz.c
> > b/tests/qtest/fuzz/generic_fuzz.c
> > index cea7d4058e8..1307299df52 100644
> > --- a/tests/qtest/fuzz/generic_fuzz.c
> > +++ b/tests/qtest/fuzz/generic_fuzz.c
> > @@ -841,7 +841,7 @@ static void generic_pre_fuzz(QTestState *s)
> >
> > g_hash_table_iter_init(&iter, fuzzable_memoryregions);
> > while (g_hash_table_iter_next(&iter, (gpointer)&mr, NULL)) {
> > - printf(" * %s (size %lx)\n",
> > + printf(" * %s (size 0x%lx)\n",
> > object_get_canonical_path_component(&(mr->parent_obj)),
> > (uint64_t)mr->size);
> > }
> >
>
> What about a "0x%"PRIx64 ?
Ah, I only looked at the format. Even better: also use memory_region_size().