mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Fix alignment of stack variable
Declare with union similar to PGAlignedBlock. Report and fix by Andres Freund Discussion: https://postgr.es/m/20240407190731.izm3mdazednrsiqk%40awork3.anarazel.de
This commit is contained in:
@ -303,8 +303,12 @@ void
|
|||||||
TidStoreSetBlockOffsets(TidStore *ts, BlockNumber blkno, OffsetNumber *offsets,
|
TidStoreSetBlockOffsets(TidStore *ts, BlockNumber blkno, OffsetNumber *offsets,
|
||||||
int num_offsets)
|
int num_offsets)
|
||||||
{
|
{
|
||||||
char data[MaxBlocktableEntrySize];
|
union
|
||||||
BlocktableEntry *page = (BlocktableEntry *) data;
|
{
|
||||||
|
char data[MaxBlocktableEntrySize];
|
||||||
|
BlocktableEntry force_align_entry;
|
||||||
|
} data;
|
||||||
|
BlocktableEntry *page = (BlocktableEntry *) data.data;
|
||||||
bitmapword word;
|
bitmapword word;
|
||||||
int wordnum;
|
int wordnum;
|
||||||
int next_word_threshold;
|
int next_word_threshold;
|
||||||
|
Reference in New Issue
Block a user