Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf0f4fe

Browse files
committed
Add missing padding from MemoryChunk struct
Buildfarm animals skate, grison and mamba are Assert failing on thepointer being given to repalloc not being MAXALIGNED.c6e0fe1 madechanges in that area.All of these animals are 32-bit with a MAXIMUM_ALIGNOF of 8 and aSIZEOF_VOID_P of 4. I suspect that the pointer is not properly aligned dueto the lack of padding in the MemoryChunk struct.Here we add the same type of padding that was previously used inAllocChunkData and GenerationChunk thatc6e0fe1 neglected to add.Discussion:https://postgr.es/m/CAA4eK1%2B1JyW5TiL%3DyV-3Uq1CrfnTyn0Xrk5uArt31Z%3D8rgPhXQ%40mail.gmail.com
1 parentc6a43c2 commitdf0f4fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/include/utils/memutils_memorychunk.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ typedef struct MemoryChunk
111111
{
112112
#ifdefMEMORY_CONTEXT_CHECKING
113113
Sizerequested_size;
114+
#defineMEMORYCHUNK_RAWSIZE(SIZEOF_SIZE_T + 8)
115+
#else
116+
#defineMEMORYCHUNK_RAWSIZE8
117+
#endif/* MEMORY_CONTEXT_CHECKING */
118+
119+
/* ensure proper alignment by adding padding if needed */
120+
#if (MEMORYCHUNK_RAWSIZE %MAXIMUM_ALIGNOF)!=0
121+
charpadding[MAXIMUM_ALIGNOF-MEMORYCHUNK_RAWSIZE %MAXIMUM_ALIGNOF];
114122
#endif
115123

116124
/* bitfield for storing details about the chunk */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp