Closed
Description
Describe the bug
The osal-core-test is creating tasks with stacks that are 4 times larger than intended due to using uint32 instead of uint8 in these two places:
uint8 task_0_stack[TASK_0_STACK_SIZE];
uint8 task_1_stack[TASK_1_STACK_SIZE];
uint8 task_2_stack[TASK_2_STACK_SIZE];
uint8 task_3_stack[TASK_3_STACK_SIZE];
https://github.com/nasa/osal/blob/main/src/tests/osal-core-test/osal-core-test.c#L59-L62
typedef struct
{
osal_id_t task_id;
uint8 task_stack[TASK_0_STACK_SIZE];
} TestTaskData;
https://github.com/nasa/osal/blob/main/src/tests/osal-core-test/osal-core-test.c#L148-L152
To Reproduce
Steps to reproduce the behavior:
- Build and run test for system with limited memory (e.g. small RTEMS workspace)
Expected behavior
The test case that creates the max number of tasks fails.
Code snips
If applicable, add references to the software.
System observed on:
- RTEMS 5 / LEON3
Additional context
Add any other context about the problem here.
Reporter Info
Jose F Martinez Pedraza
Metadata
Metadata
Assignees
Labels
No labels