threadx
threadx copied to clipboard
the posix_arrange_msg function crashes.
it crashes when more than 1 message of the same priority present in the messageQ.
solution: To verify temp_q pointer is not null before Swap the messages: if(temp_q) { /* Swap the messages. */ for ( msg = 0; msg < 4; msg++) {
swap = *temp_q;
*temp_q = *Qread;
*Qread = swap;
temp_q++;
Qread++;
}
}
Do you have a test case for this? I am putting two and three messages of the same priority in the queue and not seeing any crash. EDIT: ah, I see now. When priority is 0. We will work on a fix.
@boria8 - as of release 6.2.0, this issue has been fixed: https://github.com/azure-rtos/threadx/blob/master/utility/rtos_compatibility_layers/posix/px_mq_arrange_msg.c