On 2019-01-05, Christian Weisgerber <[email protected]> wrote:
> The net/munin port triggers a bug in gmake. [...]
Found it (read.c):
p = value;
while ((name = find_next_token ((const char **)&p, &length)) != 0)
{
if (*p != '\0')
*p++ = '\0';
eval_makefile (name, RM_NO_DEFAULT_GOAL|RM_INCLUDED|RM_DONTCARE);
}
free (value);
The "name" pointer is stored away in eval_makefile(), and when a
later error routine outputs the string, that memory has already
been freed. Basically, a missing strdup().
Turns out the upstream git repository already had a fix.
--
Christian "naddy" Weisgerber [email protected]