ports/157274: misc/finutils: gfind segmentation fault: 11 (core dumped)
Klaus T. Aehlig
aehlig at linta.de
Mon May 30 17:50:11 UTC 2011
The following reply was made to PR ports/157274; it has been noted by GNATS.
From: "Klaus T. Aehlig" <aehlig at linta.de>
To: Eitan Adler <lists at eitanadler.com>
Cc: bug-followup at freebsd.org, fabian at wenks.ch
Subject: Re: ports/157274: misc/finutils: gfind segmentation fault: 11 (core
dumped)
Date: Mon, 30 May 2011 18:46:12 +0100
Hi,
further investigations (thanks to Helmut Grohne who helped me) on my
7.3-RELEASE virtual machine showed that gfind does the following sequence
of libc-calls, which seg faults on 7.3-RELEASE, but not on 8.2-STABLE:
open, fdopendir, readdir.
I could construct the following minimal example, which I belive should
not cause a segmentation fault, but does on 7.3-RELEASE.
# uname -a
FreeBSD 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 05:25:24 UTC 2010 root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
# cat testfdopendir.c
#include <fcntl.h>
#include <sys/types.h>
#include <dirent.h>
int main(int argc, char **argv) {
DIR *dirp;
int fd;
fd = open(".", O_RDONLY);
dirp = fdopendir(fd);
(void) readdir(dirp);
}
# cc testfdopendir.c
testfdopendir.c: In function 'main':
testfdopendir.c:10: warning: assignment makes pointer from integer without a cast
# ./a.out
Segmentation fault (core dumped)
#
Also note the compiler warning, that suggests that including <sys/types.h>
and <dirent.h> does not seem to suffice---as opposed what the man page
tells---to get the fdopendir prototype. I believe that is a bug in
RELENG_7_3_0.
Eitan: can you please inform the appropriate maintainer about this
bug (if it is not fixed already in an errata for 7.3-RELEASE)?
Unfortunately, the obvious patch does not yet solve the problem, so I
have to investigate further. But I thought, I'd still report back
the problem with the libc headers.
Best,
Klaus
More information about the freebsd-ports-bugs
mailing list