The AIX 5.3 provide the structure sockaddr_storage : struct sockaddr_storage { ushort_t __ss_family; /* address family */ char __ss_pad1[_SS_PAD1SIZE]; /* pad up to alignment field */ #if defined(__64BIT__) || (defined(_ALL_SOURCE) && defined(_LONG_LONG)) int64_t __ss_align; /* field to force desired structure */ /* storage alignment */ #else int __ss_align[2]; #endif char __ss_pad2[_SS_PAD2SIZE]; /* pad to achieve desired size */ };
In Postgres the structure SockAddr is the following : typedef struct { struct sockaddr_storage addr; ACCEPT_TYPE_ARG3 salen; } SockAddr In Postgress this structure sockaddr_storage is filled with the structure sockaddr_un but the size of sockaddr_storage is less then the size of sockaddr_un and cause a memory overflow ! Do you have any idea how to find a workaround ? Vincent Vanwynsberghe > -----Original Message----- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: mardi 10 mai 2005 18:46 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; pgsql-bugs@postgresql.org > Subject: Re: [BUGS] Bug Report with Postgres 7.4 on AIX 5.3 > > > Vincent Vanwynsberghe <[EMAIL PROTECTED]> writes: > > In our platform the sizeof of struct sockaddr_un is 1025 and > the sizeof of > > SockAddr is 144. > > Doesn't AIX provide struct sockaddr_storage? That struct has to be at > least as large as any of the other platform-specific sockaddr structs. > > regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match