Fix misaligned access of ItemPointerData on ARM

Поиск
Список
Период
Сортировка
От Piotr Stefaniak
Тема Fix misaligned access of ItemPointerData on ARM
Дата
Msg-id BLU436-SMTP793374CDF35019C01D7FF3F2C10@phx.gbl
обсуждение исходный текст
Ответы Re: Fix misaligned access of ItemPointerData on ARM  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello,

Currently there is only one struct that gets packed (via the
__attribute__ keyword that a few compilers support) and it is packed
only on ARM machines -- in order to force it to be exactly 6 bytes long.

But due to how ExecRowMark struct is laid out in memory, the packed
struct ItemPointerData begins at an uneven offset, leading to misaligned
access whenever BlockIdData is set by ItemPointerSetInvalid() (and
likely in some other places, too).

The attached patch is my attempt at fixing that by adding the aligned
attribute (the struct will remain packed).

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GROUPING
Следующее
От: Feng Tian
Дата:
Сообщение: Re: Float/Double cast to int