Be conservative about alignment requirements of struct epoll_event.
authorGreg Stark <stark@mit.edu>
Thu, 2 Jun 2016 18:23:25 +0000 (19:23 +0100)
committerGreg Stark <stark@mit.edu>
Thu, 2 Jun 2016 18:38:52 +0000 (19:38 +0100)
commita3b30763cc8686f5b4cd121ef0bf510c1533ac22
tree70ec3d1a07fffb04ecfc01fef69f1e2d77687f06
parent4edb7bd2fd6a48f6104c73551423cb208e13e529
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
src/backend/storage/ipc/latch.c