[Crash-utility] [PATCH v1 0/3] Add valgrind support for the crash's custom memory

HAGIO KAZUHITO(萩尾 一仁) k-hagio-ab at nec.com
Mon Mar 1 09:13:39 UTC 2021


-----Original Message-----
> > However, I found that the "make lzo valgrind" might not work well with
> > this v1 patch, thanks to Lianbo.
> >
> > Hatayama-san, do we need to unlink tools.o like lzo and snappy below
> > to rebuild tools.c with -DVALGRIND for e.g. "make lzo valgrind" ?
> >
> > 1757         if ((lzo || snappy) &&
> > 1758             file_exists("diskdump.o") && (unlink("diskdump.o") < 0)) {
> > 1759                 perror("diskdump.o");
> > 1760                 return;
> > 1761         }
> >
> 
> Agreed. Like this?
> 
> diff --git a/configure.c b/configure.c
> index 3748a80..52d3c24 100644
> --- a/configure.c
> +++ b/configure.c
> @@ -1760,6 +1760,12 @@ add_extra_lib(char *option)
>                 return;
>         }
> 
> +       if (valgrind &&
> +           file_exists("tools.o") && (unlink("tools.o") < 0)) {
> +               perror("tools.o");
> +               return;
> +       }
> +
>         mode = file_exists("CFLAGS.extra") ? "r+" : "w+";
>         if ((fp_cflags = fopen("CFLAGS.extra", mode)) == NULL) {
>                 perror("CFLAGS.extra");
> 
> Is it necessary to resend v2 patch series?

Yes, please add the above and a brief description to the README data and file.
Only the 1/3 patch is OK.

Thanks,
Kazu





More information about the Crash-utility mailing list