Re: epoll_wait returning EFAULT on Linux 3.2.78

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: epoll_wait returning EFAULT on Linux 3.2.78
Date: 2016-06-02 17:24:38
Message-ID: 27038.1464888278@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> That makes sense independent of 32 vs. 64 system. Part of the relevant
> struct probably require 8 byte alignment:

> typedef union epoll_data {
> void *ptr;
> int fd;
> uint32_t u32;
> uint64_t u64;
> } epoll_data_t;

On a 32-bit machine it's entirely possible that that would only require
32-bit alignment. But based on what we know so far, using our regular
MAXALIGN macro should be good enough.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-06-02 17:26:24 Re: epoll_wait returning EFAULT on Linux 3.2.78
Previous Message Greg Stark 2016-06-02 17:15:54 Re: epoll_wait returning EFAULT on Linux 3.2.78