bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

4.3.90 release candidate segfaults on linux and solaris


From: Denis Excoffier
Subject: 4.3.90 release candidate segfaults on linux and solaris
Date: Sat, 24 Sep 2022 09:36:53 +0200

Hello,

At the beginning, i found a segfault in the source code of autoconf-2.71.

I reduced the case and the current test Makefile is as follows:

% cat Makefile
export PATH = $(shell echo "`pwd`/tests:$$PATH")
foo = $(shell echo yes)

all:
        echo $(foo)
%

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:

for (ep = environ; *ep != 0; ++ep)
  if ((*ep)[nl] == '=' && strncmp (*ep, v->name, nl) == 0)
    return xstrdup ((*ep) + nl + 1);

This is new code, which seems ok, but segfault occurs because in this
environment, some *ep, while not null, is definitely not a
string (e.g. i found *ep = 0x18).

I suppose the environment got corrupted before that. Indeed, several
binary chars appear in the debug printouts with my instrumented code.
However, i was not able to figure out the root cause.

One way to circumvent temporarily the problem is
to comment out the two instances of free_childbase().
After that, the segfault completely disappears, even
with -j, and also under all the tests i can perform here in
compiling many GNU projects and also my own tools.

My linux is old (2.6.32), solaris is solaris 10 (old too...)
Under MacOS (12.6) and Cygwin (3.3.6) no segfault at all.

Hoping someone will be able to track this further.

Regards,

Denis Excoffier.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]