threadx icon indicating copy to clipboard operation
threadx copied to clipboard

the posix_arrange_msg function crashes.

Open boria8 opened this issue 3 years ago • 1 comments

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++;
}

}

boria8 avatar Mar 10 '22 21:03 boria8

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.

goldscott avatar Mar 17 '22 17:03 goldscott

@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

goldscott avatar Oct 28 '22 15:10 goldscott