From 8310170c5c3ae23002ec6f1ec551cb2e3ac8b127 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 22 Oct 2019 23:23:39 -0400 Subject: [PATCH] Fix #272: use 4K stack for sem-speed-test tasks 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. --- src/tests/sem-speed-test/sem-speed-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/sem-speed-test/sem-speed-test.c b/src/tests/sem-speed-test/sem-speed-test.c index 6d00ce42c..4e828af77 100644 --- a/src/tests/sem-speed-test/sem-speed-test.c +++ b/src/tests/sem-speed-test/sem-speed-test.c @@ -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