Content-Length: 263151 | pFad | http://github.com/postgrespro/postgres/commit/fb3ea0465c1710c565e98d4b3e37aebb4e487eaf

0C Fix wrong allocation size in c8f621c43. · postgrespro/postgres@fb3ea04 · GitHub
Skip to content

Commit fb3ea04

Browse files
committed
Fix wrong allocation size in c8f621c.
In c8f621c I forgot to account for MAXALIGN when allocating a new tuplebuf in ReorderBufferGetTupleBuf(). That happens to currently not cause active problems on a number of platforms because the affected pointer is already aligned, but others, like ppc and hppa, trigger this in the regression test, due to a debug memset clearing memory. Fix that. Backpatch: 9.4, like the previous commit.
1 parent 3fa4715 commit fb3ea04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len)
481481
{
482482
tuple = (ReorderBufferTupleBuf *)
483483
MemoryContextAlloc(rb->context,
484-
sizeof(ReorderBufferTupleBuf) + alloc_len);
484+
sizeof(ReorderBufferTupleBuf) +
485+
MAXIMUM_ALIGNOF + alloc_len);
485486
tuple->alloc_tuple_size = alloc_len;
486487
tuple->tuple.t_data = ReorderBufferTupleBufData(tuple);
487488
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/fb3ea0465c1710c565e98d4b3e37aebb4e487eaf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy