From 0f65e36ee176777a62fa0bbb8c31491928e98cf2 Mon Sep 17 00:00:00 2001 From: Jonathan Dumaresq Date: Fri, 8 Apr 2016 10:38:00 -0400 Subject: [PATCH] RTOS support: Correction of out of bound access of thread array FreeRTOS use an array to store ready task. The array size is configMAX_PRIORITIES. In the current implementation, the code try to access 1 more priority if the helper from freeRTOS contrib is used. This has effect of detecting bad thread. This patch correct this and have been tested on a code with more than 12 task. Change-Id: Id229f0b2c4bf1aab87a2a69be174cc9b6dda00cb Signed-off-by: Jonathan Dumaresq Reviewed-on: http://openocd.zylin.com/3400 Tested-by: jenkins Reviewed-by: Tomas Vanek --- contrib/rtos-helpers/FreeRTOS-openocd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/rtos-helpers/FreeRTOS-openocd.c b/contrib/rtos-helpers/FreeRTOS-openocd.c index 567e710b..81a3ab77 100644 --- a/contrib/rtos-helpers/FreeRTOS-openocd.c +++ b/contrib/rtos-helpers/FreeRTOS-openocd.c @@ -17,4 +17,4 @@ #define USED #endif -const int USED uxTopUsedPriority = configMAX_PRIORITIES; +const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1; -- 2.39.5