mirror of
https://github.com/postgres/postgres.git
synced 2026-02-24 18:37:22 -05:00
Fix wrong allocation size in c8f621c43.
In c8f621c43 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.
This commit is contained in:
parent
3fa4715c50
commit
fb3ea0465c
1 changed files with 2 additions and 1 deletions
|
|
@ -481,7 +481,8 @@ ReorderBufferGetTupleBuf(ReorderBuffer *rb, Size tuple_len)
|
|||
{
|
||||
tuple = (ReorderBufferTupleBuf *)
|
||||
MemoryContextAlloc(rb->context,
|
||||
sizeof(ReorderBufferTupleBuf) + alloc_len);
|
||||
sizeof(ReorderBufferTupleBuf) +
|
||||
MAXIMUM_ALIGNOF + alloc_len);
|
||||
tuple->alloc_tuple_size = alloc_len;
|
||||
tuple->tuple.t_data = ReorderBufferTupleBufData(tuple);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue