[Top][All Lists]

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

Re: it's make's fault (was: Re: fakeroot status (an ongoing story :)

From: Marcus Brinkmann
Subject: Re: it's make's fault (was: Re: fakeroot status (an ongoing story :)
Date: Sun, 26 May 2002 04:16:27 +0200
User-agent: Mutt/1.3.28i

On Fri, May 24, 2002 at 02:50:00PM -0400, Roland McGrath wrote:
> Probably the bug is in libc having to do with the /dev/fd* lookups.
> Try a test program that calls stat or lstat on all those bogus /dev/fd*
> names that appear in the make -d output.

Good instinct.  After spending a bit of time in the make sources, I found
the code related to the segfault, which is file_exists_p(char *name), which
splits up name into a dirname and a basename component, and tries to get the
directory listing of dirname to check if basename exists in there.

Funny, that this pointed me to another testcase:

$ ls /dev/fd
Segmentation fault
$ ls /dev/fd/.
Segmentation fault

Haha.  This could have been easier ;)  Roland, is this enough info already
to guess what is going on, or should I dig deeper into what happens in case
/dev/fd/ is accessed as a directory and its listing is desired?  I guess I
can get lots of more info by following what happens in a normal ls in the
client and in the magic translator.

BTW, the segfault does happen after the code that searches for files in
/dev/fd run, so there is some random corruption going on.  Curiously, when I
ran the original make command within gdb, it run successfully.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

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