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:
Max Romanov
2019-06-28 12:19:48 +03:00
parent 3ceec5f4d2
commit 9ea4be7e4e

View File

@@ -668,7 +668,7 @@ nxt_port_lvlhsh_frag_test(nxt_lvlhsh_query_t *lhq, void *data)
static void *
nxt_port_lvlhsh_frag_alloc(void *ctx, size_t size)
{
return nxt_mp_alloc(ctx, size);
return nxt_mp_align(ctx, size, size);
}