Make request management safer
@elfring
Submitted by Markus Elfring Assigned to Ali Abdallah @ali
Description
A change was integrated for the topic “Fix handles starting from zero (Bug #16814)”. f8e6f17d
The variable “handle” became an unsigned integer in the function “tumbler_scheduler_request_new”. This data type provides support for the computation functionality “wraparound”. I find that this design choice contains a risk as long as it is not checked if previous request identifiers became reusable again. (The concrete life time of managed data processing objects is unknown.)
Thus I suggest to consider additional software design options.
-
Terminate the program after the zero handle was detected again so that duplicate assignments of request identifiers can generally not happen.
-
Introduce a dynamic tracking for assigned requests by configurable data structures according to system preferences in a run time environment.
Version: 0.2.8