Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad function prototype for tpl_check_stack_* functions #34

Open
KamelHacene opened this issue May 3, 2016 · 1 comment
Open

Bad function prototype for tpl_check_stack_* functions #34

KamelHacene opened this issue May 3, 2016 · 1 comment

Comments

@KamelHacene
Copy link
Contributor

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants