Fixing allocation alignment for port fragments.
All allocated blocks for lvlhash required to be aligned because lower address bits used for various extra information. Using unaligned blocks may cause invalid memory aceess. This was issue found on buildbot running large configuration tests.
This commit is contained in:
@@ -668,7 +668,7 @@ nxt_port_lvlhsh_frag_test(nxt_lvlhsh_query_t *lhq, void *data)
|
|||||||
static void *
|
static void *
|
||||||
nxt_port_lvlhsh_frag_alloc(void *ctx, size_t size)
|
nxt_port_lvlhsh_frag_alloc(void *ctx, size_t size)
|
||||||
{
|
{
|
||||||
return nxt_mp_alloc(ctx, size);
|
return nxt_mp_align(ctx, size, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user