LDP workers is used as vector but was initialized as a pool. There was
no side effect but ASAN does not properly unpoison memory and this
triggers false used-after-poison crashes.
Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie769dad0e86ab970de9929800d0a4131f846e70e
{
if (ldp->workers)
return;
{
if (ldp->workers)
return;
- pool_alloc (ldp->workers, LDP_MAX_NWORKERS);
+ ldp->workers = vec_new (ldp_worker_ctx_t, LDP_MAX_NWORKERS);
}
ldp->vcl_needs_real_epoll = 0;
ldp_alloc_workers ();
}
ldp->vcl_needs_real_epoll = 0;
ldp_alloc_workers ();
- ldpw = ldp_worker_get_current ();
- pool_foreach (ldpw, ldp->workers) {
+ vec_foreach (ldpw, ldp->workers)
clib_memset (&ldpw->clib_time, 0, sizeof (ldpw->clib_time));
clib_memset (&ldpw->clib_time, 0, sizeof (ldpw->clib_time));
LDBG (0, "LDP initialization: done!");
LDBG (0, "LDP initialization: done!");