Skip to content

Update stack sizes on osal-core-test #1501

Closed
@pepepr08

Description

@pepepr08

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:

  1. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions