summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-05-21 16:47:05 +0200
committerBenoƮt Ganne <bganne@cisco.com>2020-06-16 16:05:01 +0000
commitcea46522e79637f6ec37c03ec3fbeb87b160a378 (patch)
tree1579ebeccfca77b97ba2dd35fc128ba7462c2ac5 /src/vlib/threads.c
parent173484fe3a9607ef96dc352aa148b904aaa3fa54 (diff)
vlib: address sanitizer support for stack switch, enable clang
Type: improvement Change-Id: I81df4b61d1f0b8c1df77c1ee9bebcb491e155b69 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/threads.c')
-rw-r--r--src/vlib/threads.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 2f141f10d05..a8c1a1a207c 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -581,6 +581,7 @@ vlib_worker_thread_bootstrap_fn (void *arg)
__os_thread_index = w - vlib_worker_threads;
+ vlib_process_start_switch_stack (vlib_mains[__os_thread_index], 0);
rv = (void *) clib_calljmp
((uword (*)(uword)) w->thread_function,
(uword) arg, w->thread_stack + VLIB_THREAD_STACK_SIZE);
@@ -1777,6 +1778,8 @@ vlib_worker_thread_fn (void *arg)
vlib_main_t *vm = vlib_get_main ();
clib_error_t *e;
+ vlib_process_finish_switch_stack (vm);
+
ASSERT (vm->thread_index == vlib_get_thread_index ());
vlib_worker_thread_init (w);