TrampolineRTOS / trampoline

Trampoline is a static RTOS for small embedded systems. Its API is aligned with OSEK/VDX OS and AUTOSAR OS 4.2 standards.
GNU General Public License v2.0
620 stars 269 forks source link

Bad function prototype for tpl_check_stack_* functions #34

Open KamelHacene opened 8 years ago

KamelHacene commented 8 years ago

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 {
'''

jlbirccyn commented 1 year ago

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.