diff options
author | Xiaoming Jiang <jiangxiaoming@outlook.com> | 2022-12-10 03:44:16 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2023-03-06 17:02:57 +0000 |
commit | 4646cd4e20db0cd593dc5964c9cac70cf73f7652 (patch) | |
tree | 98c3497aa1d443a7e64bfc1c604fe5e028d1e280 /src/vlib | |
parent | c36f9b567d6c95a1b099226d322cfc7ffad9b3cc (diff) |
vlib: fix ASAN fake stack size set error when switching to process
Type: fix
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I2add6cb8dba837e47596983ec8303883aba3a138
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/node_funcs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h index 115127ffee0..a75f1f3a16a 100644 --- a/src/vlib/node_funcs.h +++ b/src/vlib/node_funcs.h @@ -59,7 +59,8 @@ vlib_process_start_switch_stack (vlib_main_t * vm, vlib_process_t * p) { #ifdef CLIB_SANITIZE_ADDR void *stack = p ? (void *) p->stack : vlib_thread_stacks[vm->thread_index]; - u32 stack_bytes = p ? p->log2_n_stack_bytes : VLIB_THREAD_STACK_SIZE; + u32 stack_bytes = + p ? (1ULL < p->log2_n_stack_bytes) : VLIB_THREAD_STACK_SIZE; __sanitizer_start_switch_fiber (&vm->asan_stack_save, stack, stack_bytes); #endif } |