threadx icon indicating copy to clipboard operation
threadx copied to clipboard

Incorrect constant used in comparison.

Open hstokes1 opened this issue 10 months ago • 2 comments

https://github.com/eclipse-threadx/threadx/blob/7ad78c40e9702917264a9b722890110fdb909ebc/ports/cortex_m4/iar/src/tx_iar.c#L289

Should be comparing with _MAX_FLOCK, not _MAX_LOCK.

Result of bug:

When _MAX_FLOCK is greater than _MAX_LOCK, some file mutexes are incorrectly set to NULL, and the app will hard fault as soon as the file lock is encountered.

hstokes1 avatar Mar 10 '25 16:03 hstokes1