AnsweredAssumed Answered

Bug in osMailCAlloc (cmsis_os.c)

Question asked by nogueira_da_silva.ke on May 29, 2017
Latest reply on Feb 8, 2018 by Imen D

I believe there is a bug in the osMailCAlloc function from cmsis_os.c V1.02 (STM32Cube_FW_F1_V1.4.0).

 

The function will always assign 0 to the first 4 bytes of the block, since sizeof an uint32_t is 4.

 

if (p) {
  for (i = 0; i < sizeof(queue_id->queue_def->item_sz); i++) {
    ((uint8_t *)p)[i] = 0;
  }

}

Outcomes