summaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2016-09-19 10:23:39 +0300
committerJohn Lo <loj@cisco.com>2016-09-20 16:24:53 +0000
commitd334a6b458e2ea60ee82b402d4785f5a2abc3c24 (patch)
treefc9d38bf928875b92a4ef58a53718a4b30d74ccf /vlib
parent2d085d9c6185caa2a84c5fd8740d279336f2d702 (diff)
Added volatile to local variables needed by setjmp
Function vlib_main uses nonlocal control transfer (setjmp, longjmp), local variables might be mapped to cpu registers which might be different when longjmp'ing back to it. Added volatile to keep those variables on the stack. to fix vpp crash when exiting via SIGTERM. Change-Id: I03e836966c68a966a84d635bc1f7b3a3c252f3ea Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vlib/vlib/main.c b/vlib/vlib/main.c
index c4062a7f333..809abdf5538 100644
--- a/vlib/vlib/main.c
+++ b/vlib/vlib/main.c
@@ -1569,9 +1569,9 @@ dummy_queue_signal_callback (vlib_main_t * vm)
/* Main function. */
int
-vlib_main (vlib_main_t * vm, unformat_input_t * input)
+vlib_main (vlib_main_t * volatile vm, unformat_input_t * input)
{
- clib_error_t *error;
+ clib_error_t *volatile error;
vm->queue_signal_callback = dummy_queue_signal_callback;