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

Update stack sizes on osal-core-test #1501

Open
pepepr08 opened this issue Mar 19, 2025 · 0 comments · May be fixed by #1502
Open

Update stack sizes on osal-core-test #1501

pepepr08 opened this issue Mar 19, 2025 · 0 comments · May be fixed by #1502

Comments

@pepepr08
Copy link
Contributor

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

pepepr08 added a commit to pepepr08/osal that referenced this issue Mar 19, 2025
@pepepr08 pepepr08 linked a pull request Mar 19, 2025 that will close this issue
2 tasks
pepepr08 added a commit to pepepr08/osal that referenced this issue Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant