diff options
| author | Frédéric Desbiens <[email protected]> | 2026-09-03 13:50:31 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-09-03 13:50:31 -0400 |
| commit | 508af549dae1c269088b8e02c45670bf87de33b1 (patch) | |
| tree | aac58a75f88785e2574e3e709c146c8d727f2397 /common_modules/module_manager/utilities/module_binary_to_c_array.c | |
| parent | 17ff21a07f35d5c58f29a8e5dcb5ffdcd3d17dcd (diff) | |
Fixed the incorrect loop bound constant in the IAR file lock support (#695)
The IAR multithreaded library support code allocates its file lock
mutexes from an array of _MAX_FLOCK entries, but the wrap-around check
and the exhaustion check in __iar_file_Mtxinit() both compared against
_MAX_LOCK, the bound of the unrelated system lock mutex array.
When _MAX_FLOCK is greater than _MAX_LOCK, the free mutex index wrapped
early and the exhaustion check reported failure while free entries
remained, so *m was set to TX_NULL and the application faulted the first
time a file lock was taken. When _MAX_FLOCK is smaller than _MAX_LOCK,
the free mutex index was allowed to run past the end of
__tx_iar_file_lock_mutexes and the exhaustion check could never fire.
Corrected all four comparisons in each of the 27 copies of tx_iar.c.
Fixes #444
Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager/utilities/module_binary_to_c_array.c')
0 files changed, 0 insertions, 0 deletions
