Re: epoll_wait returning EFAULT on Linux 3.2.78 - Mailing list pgsql-hackers

From Greg Stark
Subject Re: epoll_wait returning EFAULT on Linux 3.2.78
Date
Msg-id CAM-w4HMYU81JXHjqPuvTsc+sJpF+h4SDwkD8=51r13hxgUApzQ@mail.gmail.com
Whole thread Raw
In response to Re: epoll_wait returning EFAULT on Linux 3.2.78  (Andres Freund <andres@anarazel.de>)
Responses Re: epoll_wait returning EFAULT on Linux 3.2.78  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Jun 2, 2016 at 6:35 PM, Andres Freund <andres@anarazel.de> wrote:
> Want me to polish that up and push, or do you want to go back and forth
> and push yourself?

I'm happy to check if my bits still work if it's not too much hassle
to go back and forth.


> They should be *after* the multiplications. If arrays of structs are
> internally misaligned there's nothing we can do.

Well there's not *nothing* we can do. I thought I we were going to
have to go back and do manual offset calculations to get that right.
But with the u64_t element that's probably not necessary. It's a bit
scary having that be the only thing protecting it but then again it's
probably exactly why it's there. Given how much of a pain doing manual
offset calculations I'm happy to go along and say it's not worth
bothering.

Should the maxaligns be there for the non-epoll cases? I tossed them
in without paying much attention. I really have no idea if they're
needed on Windows or not for example.


-- 
greg



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: epoll_wait returning EFAULT on Linux 3.2.78
Next
From: Andres Freund
Date:
Subject: Re: epoll_wait returning EFAULT on Linux 3.2.78