pgsql: Be conservative about alignment requirements of struct epoll_eve

From: Greg Stark <stark(at)mit(dot)edu>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Be conservative about alignment requirements of struct epoll_eve
Date: 2016-06-02 18:42:24
Message-ID: E1b8XZY-0000TG-1i@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Be conservative about alignment requirements of struct epoll_event.

Use MAXALIGN size/alignment to guarantee that later uses of memory are
aligned correctly. E.g. epoll_event might need 8 byte alignment on some
platforms, but earlier allocations like WaitEventSet and WaitEvent might
not sized to guarantee that when purely using sizeof().

Found by myself while testing on an Sun Ultra 5 (Sparc IIi) with some
editorializing by Andres Freund.

In passing fix a couple typos in the area

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a3b30763cc8686f5b4cd121ef0bf510c1533ac22

Modified Files
--------------
src/backend/storage/ipc/latch.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2016-06-03 02:56:27 Re: pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re
Previous Message Kevin Grittner 2016-06-02 17:54:22 pgsql: C comment improvement & typo fix.