[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [OpenOCD-devel] [PATCH]: 72b52e2 rtos/FreeRTOS: Fix FreeRTOS thread list reading
From:       gerrit () openocd ! org (gerrit)
Date:       2019-08-07 13:19:40
Message-ID: 20190807131940.3F48E2522570 () mail ! openocd ! org
[Download RAW message or body]

This is an automated email from Gerrit.

Rahul Masurkar (rahulgm@marvell.com) just uploaded a new patch set to Gerrit, which \
you can find at http://openocd.zylin.com/5273

-- gerrit

commit 72b52e2e0161a8b27d24ece59c1e8518d924a7e7
Author: Rahul Masurkar <rahulgm@marvell.com>
Date:   Tue Aug 6 18:19:07 2019 +0530

    rtos/FreeRTOS: Fix FreeRTOS thread list reading
    
    Change-Id: I749ae94ec7279907b1905c02ecc1e9661f43ef70
    Signed-off-by: Rahul Masurkar <rahulgm@marvell.com>

diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c
index 9d89974..77c6e79 100644
--- a/src/rtos/FreeRTOS.c
+++ b/src/rtos/FreeRTOS.c
@@ -263,14 +263,14 @@ static int FreeRTOS_update_threads(struct rtos *rtos)
 
 	symbol_address_t *list_of_lists =
 		malloc(sizeof(symbol_address_t) *
-			(max_used_priority+1 + 5));
+			(max_used_priority + 5));
 	if (!list_of_lists) {
 		LOG_ERROR("Error allocating memory for %" PRId64 " priorities", \
max_used_priority);  return ERROR_FAIL;
 	}
 
 	int num_lists;
-	for (num_lists = 0; num_lists <= max_used_priority; num_lists++)
+	for (num_lists = 0; num_lists < max_used_priority; num_lists++)
 		list_of_lists[num_lists] = rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address +
 			num_lists * param->list_width;
 

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic