Re: [HACKERS] Warning on contrib/tsearch2

2007-03-29 Thread Teodor Sigaev
code: random backend code should not, not, not be using fopen() directly. If you lose control to an elog, which is certainly possible seeing that this loop calls into the utils/mb subsystem, you'll leak the file descriptor. Use AllocateFile/FreeFile instead of fopen/fclose. Will soon in

Re: [HACKERS] Warning on contrib/tsearch2

2007-03-27 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: In CVS HEAD: contrib/tsearch2/dict_syn.c:124: warning: 'slen' is used uninitialized in this function Induced by the recent pg_verifymbstr() patch. Seems to be a genuine bug. Fixed, but I see a worse problem with this code: random backend code should

Re: [HACKERS] Warning on contrib/tsearch2

2007-03-27 Thread Andrew Dunstan
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: In CVS HEAD: contrib/tsearch2/dict_syn.c:124: warning: 'slen' is used uninitialized in this function Induced by the recent pg_verifymbstr() patch. Seems to be a genuine bug. Fixed, but I see a worse problem with this code:

Re: [HACKERS] Warning on contrib/tsearch2

2007-03-27 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: ... random backend code should not, not, not be using fopen() directly. If you lose control to an elog, which is certainly possible seeing that this loop calls into the utils/mb subsystem, you'll leak the file descriptor. Use