[PATCH] Fix Gnulib glob.c resource leaks found by Coverity
Sergio Durigan Junior
Fri Aug 23 18:37:00 GMT 2019
On Friday, August 23 2019, Gary Benson wrote:
> Basically Gnulib appends flags to $CC during ./configure, but then
> GDB's Makefile passes $CC to Gnulib's Makefile for building, so
> Gnulib's ./configure does all it's checks with these special flags,
> and then GDB strips them off while building Gnulib, which makes the
> compilation fail. I've tried for some weeks to fix this, both in
> Gnulib (making it not touch $CC) and more recently in GDB (making it
> not overwrite $CC) but nothing I've tried worked so I've given up.
> FWIW it can't be fixed by not passing CC to Gnulib's Makefile from
> GDB as Sergio suggested; Gnulib itself builds, but GDB then fails to
> build because the Gnulib code it includes was configured with the
> special flags Gnulib added but that aren't there for the GDB build.
It's been a while, but I remember that indeed, it was not possible to
not pass $CC to gnulib; I made that suggestion before actually trying (I
thought it was going to be possible at the time).
FWIW, I agree with Gary's approach here. We discussed this internally
and it's just too much work (and not a good use of Gary's time, IMHO) to
update our gnulib copy and fix this error. Unfortunately, we will have
to address this at a later moment.
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
More information about the Gdb-patches