[HACKERS] packetBuf size
| От | Igor |
|---|---|
| Тема | [HACKERS] packetBuf size |
| Дата | |
| Msg-id | 9bcc51ff96aafeaa69bea97bdd525f9e обсуждение исходный текст |
| Список | 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?
=+=------------------------/\---------------------------------=+=
Igor Natanzon |**| E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=
------------------------------
В списке pgsql-hackers по дате отправления: