On Thu, 2022-06-16 at 13:30 -0700, Dan Williams wrote:
> Vishal Verma wrote:
> > A GCC update (12.1.1) now produces a warning in the xrealloc()
> > wrapper
> > (originally copied from git, and used in strbuf operations):
> > 
> >   ../util/wrapper.c: In function ‘xrealloc’:
> >   ../util/wrapper.c:34:31: warning: pointer ‘ptr’ may be used after
> > ‘realloc’ [-Wuse-after-free]
> >      34 |                         ret = realloc(ptr, 1);
> >         |                               ^~~~~~~~~~~~~~~
> > 
> > Pull in an updated definition for xrealloc() from the git project
> > to fix this.
> > 
> > Cc: Dan Williams <dan.j.willi...@intel.com>
> > Signed-off-by: Vishal Verma <vishal.l.ve...@intel.com>
> 
> Looks like a faithful reproduction of what upstream git did minus the
> memory_limit_check() infra, but we can think about that later.

And minus the xmalloc() stuff, but I don't think we /need/ that (yet).

> 
> Reviewed-by: Dan Williams <dan.j.willi...@intel.com>

Thanks!

Reply via email to