diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-06-28 12:19:48 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-06-28 12:19:48 +0300 |
commit | 9ea4be7e4ec5d0d24cddb5868aa4920f0298ee67 (patch) | |
tree | 5fd69d4a1b4600ac063e5d35e06cd7d3746b4ad6 /src/nxt_port_socket.c | |
parent | 3ceec5f4d2fa59adc1c5764ef491a8f848bbf452 (diff) | |
download | unit-9ea4be7e4ec5d0d24cddb5868aa4920f0298ee67.tar.gz unit-9ea4be7e4ec5d0d24cddb5868aa4920f0298ee67.tar.bz2 |
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.
Diffstat (limited to 'src/nxt_port_socket.c')
-rw-r--r-- | src/nxt_port_socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index c9b5105b..fe113a68 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -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); } |