Re: Bug Report with Postgres 7.4 on AIX 5.3 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug Report with Postgres 7.4 on AIX 5.3
Date
Msg-id 4650.1115827324@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug Report with Postgres 7.4 on AIX 5.3  (Vincent Vanwynsberghe <vvanwynsberghe@ccncsi.net>)
List pgsql-bugs
Vincent Vanwynsberghe <vvanwynsberghe@ccncsi.net> writes:
> The AIX 5.3 provide the structure sockaddr_storage :
> ...
> 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 ?

Report this bug to IBM: the AIX headers are defining the structs wrong.
You can quote RFC 3493 - Basic Socket Interface Extensions for IPv6
section 3.10:

   One simple addition to the sockets API that can help application
   writers is the "struct sockaddr_storage".  This data structure can
   simplify writing code that is portable across multiple address
   families and platforms.  This data structure is designed with the
   following goals.

   - Large enough to accommodate all supported protocol-specific address
      structures.


            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Missing tables in postgresql 7.2.4
Next
From: "Michael Beckstette"
Date:
Subject: Re: Missing tables in postgresql 7.2.4