Re: test failure on latest source

From: Marco Atzeri <marco(dot)atzeri(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: test failure on latest source
Date: 2014-06-23 13:06:19
Message-ID: 53A8264B.6080907@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16/04/2014 18:55, Marco Atzeri wrote:
> On 16/04/2014 17:40, Tom Lane wrote:
>
>> The bigger picture though is that this code isn't failing on the
>> buildfarm. So what we need to ask is what's different about Marco's
>> machine.
>
> good question.
> I checked again and I found that the fault is only on
> the cygwin 64 bit build but not on the cygwin 32 bit one.
>
> I was sure to have tested both, but it seems this time
> I missed the comparison.
>
>> regards, tom lane
>
> Regards
> Marco
>

to close the issue, we have identified the fault in the getaddrinfo
system call on cygwin64.

"What happens is that the field ai_addrlen is defined as socklen_t in
POSIX, but as size_t in the W32 API. On 64 bit, socklen_t is 4 bytes
while size_t is 8 bytes.
Setting all the hintp members manually (in
contrast to calloc'ing it or memset'ing it to 0) leaves the 4 upper
bytes of the ai_addrlen untouched. This in turn leads to a high
probability that ai_addrlen has an invalid value when entering
Winsock's getsockopt."

Regards
Marco

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2014-06-23 13:10:24 Re: tab completion for setting search_path
Previous Message Andres Freund 2014-06-23 13:04:34 Re: Use a signal to trigger a memory context dump?