1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/ps
Juan Carrano d167cb3af8
sys/ps: Improve robustness against string table errors.
The mapping from thread state codes to a human readable string in the
PS modules has to be maintained manually. There is a very real possibility
for it to get out of sync with the actual defined states, which would cause
a crash when a lookup with an out of bounds index is performed. Also, because
of the way the array is defined, there could be gaps (which will be filled by
nulls).

This patch replaces the array looukup by a function that checks bounds and
also triggers an assertion so that the issue can be caught during development.
2020-07-29 17:12:40 +02:00
..
Makefile make: detect their module name automatically 2014-06-17 15:49:32 +02:00
ps.c sys/ps: Improve robustness against string table errors. 2020-07-29 17:12:40 +02:00