Re: initdb segfault - solaris 8
От | Bruce Momjian |
---|---|
Тема | Re: initdb segfault - solaris 8 |
Дата | |
Msg-id | 200110291755.f9THtKn25738@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: initdb segfault - solaris 8 (Seth Hettich <sjh@scotch.ucf.ics.uci.edu>) |
Список | pgsql-general |
> > sjh@ucf.ics.uci.edu writes: > > > Here is the stack trace w/ --enable-debug > > > > > #0 0x81cd6ba in ValidateBinary ( > > > path=0x804718c "/pkg/postgresql-7.1.3/bin/postgres") at findbe.c:115 > > > > Well, that narrows it down to a problem with the "struct group" returned > > by getgrgid() ... but the code is correct according to the man page I > > have here for getgrgid. You're going to have to dig further on your > > own. > > > > FWIW, I'd still wonder about whether the definition of "struct group" > > seen by Postgres agrees with what libc thinks. > > I think it's a bug in the solaris 8 LDAP NSS module that returns > a null gr_mem. But, it's also poor form to use gr_mem before checking > it... You got us. :-) I have added code to check for a NULL return from getgrgid(). -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: src/backend/utils/init/findbe.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/init/findbe.c,v retrieving revision 1.23 diff -c -r1.23 findbe.c *** src/backend/utils/init/findbe.c 2001/10/21 03:43:54 1.23 --- src/backend/utils/init/findbe.c 2001/10/29 17:51:36 *************** *** 103,109 **** if (pwp->pw_gid == buf.st_gid) ++in_grp; else if (pwp->pw_name && ! (gp = getgrgid(buf.st_gid))) { for (i = 0; gp->gr_mem[i]; ++i) { --- 103,109 ---- if (pwp->pw_gid == buf.st_gid) ++in_grp; else if (pwp->pw_name && ! (gp = getgrgid(buf.st_gid)) != NULL) { for (i = 0; gp->gr_mem[i]; ++i) {
В списке pgsql-general по дате отправления: