Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-18 Thread Peter Davie
Hi Bruce, That would work! Thanks Peter Bruce Momjian wrote: One idea would be to use malloc() to allocate storage for the thread-safe buffers when compiled with thread-safety, rather than using the stack. --- Peter

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-14 Thread Bruce Momjian
One idea would be to use malloc() to allocate storage for the thread-safe buffers when compiled with thread-safety, rather than using the stack. --- Peter Davie wrote: > Hi Tom, > > How many of these platforms you use are P

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-12 Thread Peter Davie
Hi Tom, How many of these platforms you use are POSIX-compliant?  This information came from the POSIX web site (NOT THE DIGITAL/COMPAQ/HP/... WEBSITE).  Sysconf(_SC_GETPW_R_SIZE_MAX)  is supported by Solaris 2.5, SCO UNIX (circa 1999!),  Digital UNIX/Compaq Tru64 UNIX, FreeBSD,  AIX, HP-UX, a

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-12 Thread Peter Davie
Hi Guys, Please refer to : "[TSF] The getpwuid_r() function shall update the passwd structure pointed to by pwd and store a pointer to that structure at the location pointed to by result. The structure shall contain an entry from the user database with a matching uid. Storage referenced by t

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-09 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > OK, we got a report. I just thinkg 8192 is excessive for that > structure, and if someone is having a problem, others might as well. >> On Tru64 UNIX, sysconf(_SC_GETPW_R_SIZE_MAX) returns 1024. I'd be more impressed by this line of reasoning if _SC_GE

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-09 Thread Bruce Momjian
OK, we got a report. I just thinkg 8192 is excessive for that structure, and if someone is having a problem, others might as well. --- Peter Davie wrote: > Hi Guys, > > Please refer to >

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-08 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > What do people think about using (sizeof(struct passwd) + BUFLEN/2) rather > than BUFLEN for the getpwuid_r size, or (sizeof(struct passwd) + MAXPGPATH*2)? > That would reduce the stack requirements and still be safe, I think. Why bother? Peter did not

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-08 Thread Bruce Momjian
What do people think about using (sizeof(struct passwd) + BUFLEN/2) rather than BUFLEN for the getpwuid_r size, or (sizeof(struct passwd) + MAXPGPATH*2)? That would reduce the stack requirements and still be safe, I think. --