bihash template: reinstate the check for the available memory in the arena 94/14894/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 19 Sep 2018 13:50:55 +0000 (15:50 +0200)
committerDave Barach <openvpp@barachs.net>
Wed, 19 Sep 2018 19:21:45 +0000 (19:21 +0000)
commita713254d689deee1718bb515c3961bf4ed435504
tree49dab1298704329bb4d55f3324d9dc419ef5a46c
parent2646c80db8d3d1a3cd7555328d5a0038798f861e
bihash template: reinstate the check for the available memory in the arena

ffb14b9554afa1e58c3657e0c91dda3135008274 has changed the semantics
of alloc_arena_next to become an offset off alloc_arena, but
in the available memory check in BV (alloc_aligned) it still treats
it as a virtual address, resulting in the check always succeeding,
thus over a prolonged period bihash arena allocator
potentially overwriting whatever is following the arena.

Change-Id: I18882c5f340ca767a389e15cca2696a0a97ef015
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/vppinfra/bihash_template.c
src/vppinfra/bihash_template.h