Re: [HACKERS] packetBuf size
| От | Bruce Momjian |
|---|---|
| Тема | Re: [HACKERS] packetBuf size |
| Дата | |
| Msg-id | 3c0bc44a6e12da0950df7da0c72541d1 обсуждение исходный текст |
| Ответ на | [HACKERS] packetBuf size (Igor <igor@sba.miami.edu>) |
| Список | pgsql-hackers |
> > Does anyone have any idea why the DATA variable in > PacketBuf is this MESSAGE_SIZE size in libpq? > #define MESSAGE_SIZE sizeof(StartupInfo)+5 > ^^^ > Bruce, I think you might have commented on this before..I am not sure. > The total amount of data written into that variable is > database (64 bytes), username (32 bytes), options (64), execfile(64), > tty (64)...total is 288 bytes (MESSAGE_SIZE is 293). The last 5 bytes are > never used. Purify reports an uninitialized memory read when the packetBuf > is passed into sendto() function. Removing the +5 from the definition of > MESSAGE_SIZE removes this error, and I haven't noticed any problems after > running regression tests... > > Comments? No one knows what that 5 is for. We are going to do some libpq communication changes in 6.2, so hopefully we will eliminate it then. I say remove the +5 as soon we start on 6.2, and see what happens. - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------
В списке pgsql-hackers по дате отправления: