diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-09 14:47:05 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2022-03-09 14:47:05 +0100 |
commit | 317cace6185ae134d78a38e1a20249baf751035e (patch) | |
tree | bc7121e745cbb169a4cd8bfdcbb7e8546982274d /src/vpp | |
parent | 7fc0ee7f65fbbced6e987f8bfd927a595b7ff7ee (diff) |
vat: fix vat_suspend crash
Deadly combination is clib_{set,long}jmp + lazy linking + tail call compiler
optimization. On the first call to clib_setjmp, dynamic linker executes loader
code which then calls clib_setjmp, so stored stack position contains dynamic
loader data. Tail call optimization simply jumps back to the calling
code when clib_longjump is called and that results in wrong return
address used from the stack.
Change-Id: Ia7d8dbd5b2c425cdd0449374aa07ab6b684a330e
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vpp')
-rw-r--r-- | src/vpp/api/api_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vpp/api/api_main.c b/src/vpp/api/api_main.c index 9b915eeffcf..63bb5f21c06 100644 --- a/src/vpp/api/api_main.c +++ b/src/vpp/api/api_main.c @@ -4,8 +4,8 @@ vat_main_t vat_main; -void -vat_suspend (vlib_main_t * vm, f64 interval) +void __clib_no_tail_calls +vat_suspend (vlib_main_t *vm, f64 interval) { vlib_process_suspend (vm, interval); } |