/usr/bin/make segmentation fault

Simon J. Gerraty sjg at juniper.net
Sat Apr 2 20:08:02 UTC 2016


Roger Marquis <marquis at roble.com> wrote:

> Don't know how to debug this and cannot post the Makefile in question but it

Can you provide something similar that triggers the issue?
It's rather hard to tell what's wrong without knowing what *should* be
happening.

> last worked in 8.4.  In 11-CURRENT Var_Value appears to return NULL at
> /usr/src/contrib/bmake/compat.c:621
> 
>   Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0);
> 
> which passes the NULL to Var_Set as the second argument (val) where,
> eventually, /usr/src/contrib/bmake/var.c:973

Which means TARGET hasn't been set, and there's probably something
rather interesting about your makefile ;-)
This should of course never happen.

Even if Var_Set checked the failure and returned harmlessly you have a
serious problem.

> Any and all pointers appreciated,

What is content of gn at

> #2  0x0000000000402040 in Compat_Make (gnp=0x800a1c340,
> #pgnp=0x800a1df00)
> at /usr/src/contrib/bmake/compat.c:621


More information about the freebsd-current mailing list