cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube FreeRTOS Bug

michaelallan9
Associate
Posted on September 07, 2016 at 18:15

I've found a bug in the implementation of osMailCAlloc - the code uses sizeof(queue_id->queue_def->item_sz) when item_sz already has the right value.

@@ -1114,11 +1114,11 @@ 
void
*osMailCAlloc (osMailQId queue_id, uint32_t millisec)
{
uint32_t i;
void
*p = osMailAlloc(queue_id, millisec);
if
(p) {
- 
for
(i = 0; i < 
sizeof
(queue_id->queue_def->item_sz); i++) {
+ 
for
(i = 0; i < queue_id->queue_def->item_sz; i++) {
((uint8_t *)p)[i] = 0;
}
}
return
p;

I'm using STM32Cube 4.0.
2 REPLIES 2
slimen
Senior
Posted on September 08, 2016 at 10:01

Hi,

I confirm this bug. 

It is also checked with new CubeMx version 4.16.1.

Regards
Imen.D
ST Employee
Posted on May 23, 2018 at 11:49

Hello

 ,

Thanks for reporting such problem. This issue is already fixed.

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen