> On 2022-09-24 17:19, Paul Smith wrote: > > On Sat, 2022-09-24 at 09:36 +0200, Denis Excoffier wrote: >> In my specific configuration (under linux, with --disable-nls, >> --disable-load, without using -j, using 'env -i make -d -n'), a >> segfault always occurs around line 118 of src/expand.c: >> >> My linux is old (2.6.32), > > The kernel version is not very interesting for a userspace program like > GNU make. But, it would be interesting if you could provide the > version of libc you are using; on my system I can use: > > ~$ /lib/x86_64-linux-gnu/libc.so.6 --version | head -n1 > > You can find the library by running "ldd make | grep libc' > > It's also interesting you're running with "env -i" that seems like it > might be related. Do you get the crash if you run without that? > > A quick check on my system was not able to show any issues using the > same setup as you, even building make with ASAN. I will review the > code especially around memory handling in the child structures to see > if I can find an error by inspection.
% ldd make linux-gate.so.1 (0xb76e4000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7565000) /lib/ld-linux.so.2 (0xb76e5000) % /lib/i386-linux-gnu/libc.so.6 --version | head -2 GNU C Library (Debian GLIBC 2.19-18+deb8u10) stable release version 2.19, by Roland McGrath et al. Copyright (C) 2014 Free Software Foundation, Inc. % The segfault also occurs without ‘env -i’. I was just trying to minimize the number of entries in the environment. In any case make seems to always add a few ones by default (like MAKEFLAGS etc.). The crashes in solaris and linux are so similar, and go away also so similarly, that i would primarily think about size of types. Under cygwin and MacOS all sizes (pointers, long int, size_t, SIZE_MAX, time_t) are 8, while under (this) solaris and (this) linux all sizes are 4. Only size of int is 4 on all. Regards, Denis Excoffier.