trampoline icon indicating copy to clipboard operation
trampoline copied to clipboard

Bad function prototype for tpl_check_stack_* functions

Open KamelHacene opened this issue 9 years ago • 1 comments

Both functions tpl_check_stack_pointer and tpl_check_stack_footprint take a ' const tpl_proc_id' parameter instead of a 'const tpl_stack' as required by the caller tpl_check_stack in file autosar/tpl_as_stack_monitor.c : ''' 31 FUNC(void, OS_CODE) tpl_check_stack (
1 CONST(tpl_proc_id, AUTOMATIC) proc_id)
2 {
3 CONSTP2CONST(tpl_stack, AUTOMATIC, OS_APPL_DATA) stack =
4 &(tpl_stat_proc_table[proc_id]->stack);
10 if ((!tpl_check_stack_pointer(stack)) ||
11 (!tpl_check_stack_footprint(stack)))
12 {
'''

KamelHacene avatar May 03 '16 09:05 KamelHacene

It is the caller which is wrong.

  1. It is impossible to check the stack pointer with a pointer to the stack only.
  2. It is impossible to check the stack footprint with a pointer to the stack only.

jlbirccyn avatar Nov 24 '23 17:11 jlbirccyn