Skip to content

Commit

Permalink
Fix #272: use 4K stack for sem-speed-test tasks
Browse files Browse the repository at this point in the history
On VxWorks, no minimum stack size is implemented,
and the implementation will create tasks with an
extremely small stack if "0" is passed in.

This causes the worker tasks to overrun the stack
on Vxworks, triggering undefined/inconsistent
behavior.
  • Loading branch information
jphickey committed Oct 23, 2019
1 parent ad88aa1 commit 00a1115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/sem-speed-test/sem-speed-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ void SemSetup(void)
/*
** Create the tasks
*/
status = OS_TaskCreate( &task_1_id, "Task 1", task_1, NULL, 0, TASK_PRIORITY, 0);
status = OS_TaskCreate( &task_1_id, "Task 1", task_1, NULL, 4096, TASK_PRIORITY, 0);
UtAssert_True(status == OS_SUCCESS, "Task 1 create Id=%u Rc=%d", (unsigned int)task_1_id, (int)status);

status = OS_TaskCreate( &task_2_id, "Task 2", task_2, NULL, 0, TASK_PRIORITY, 0);
status = OS_TaskCreate( &task_2_id, "Task 2", task_2, NULL, 4096, TASK_PRIORITY, 0);
UtAssert_True(status == OS_SUCCESS, "Task 2 create Id=%u Rc=%d", (unsigned int)task_2_id, (int)status);

/* A small delay just to allow the tasks
Expand Down

0 comments on commit 00a1115

Please sign in to comment.