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:
parent
304b6b1a6b
commit
0ea51bac38
|
@ -303,8 +303,12 @@ void
|
|||
TidStoreSetBlockOffsets(TidStore *ts, BlockNumber blkno, OffsetNumber *offsets,
|
||||
int num_offsets)
|
||||
{
|
||||
char data[MaxBlocktableEntrySize];
|
||||
BlocktableEntry *page = (BlocktableEntry *) data;
|
||||
union
|
||||
{
|
||||
char data[MaxBlocktableEntrySize];
|
||||
BlocktableEntry force_align_entry;
|
||||
} data;
|
||||
BlocktableEntry *page = (BlocktableEntry *) data.data;
|
||||
bitmapword word;
|
||||
int wordnum;
|
||||
int next_word_threshold;
|
||||
|
|
Loading…
Reference in New Issue