From: | Vincent Vanwynsberghe <vvanwynsberghe(at)ccncsi(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-ports(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Bug Report with Postgres 7.4 on AIX 5.3 |
Date: | 2005-05-11 13:04:42 |
Message-ID: | IKEPJJEJDCJPKMLEECEDAEJBCCAA.vvanwynsberghe@ccncsi.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-ports |
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:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: mardi 10 mai 2005 18:46
> To: vvanwynsberghe(at)ccncsi(dot)net
> Cc: pgsql-ports(at)postgresql(dot)org; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] Bug Report with Postgres 7.4 on AIX 5.3
>
>
> Vincent Vanwynsberghe <vvanwynsberghe(at)ccncsi(dot)net> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-05-11 14:52:34 | Re: [BUGS] BUG #1588: pg_autovacuum sleep parameter overflow |
Previous Message | brahim | 2005-05-11 12:36:00 | BUG #1659: primary key accepts null value |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-11 16:02:04 | Re: Bug Report with Postgres 7.4 on AIX 5.3 |
Previous Message | Tom Lane | 2005-05-10 16:45:48 | Re: Bug Report with Postgres 7.4 on AIX 5.3 |