You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the internal OS_TaskPrepare() routine, it calls a low-level implementation routine but does not propagate the return code.
To Reproduce
More theoretical than real. In POSIX this depends on the underlying pthread_setspecific() routine returning an error, of which the only documented error (at least per POSIX) is ENOMEM. However that doesn't mean that there couldn't be other implementation-specific errors on other systems.
Expected behavior
If the OS_TaskRegister_Impl() fails, this result should be propagated up the stack and prevent the task from starting.
Additional context
If this fails then it means dependent routines like OS_TaskGetId() will also be broken, so it really should block startup of the task and return the error to the caller. Catching this type of error early, when possible, is usually better than getting an obfuscated error later.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the internal
OS_TaskPrepare()
routine, it calls a low-level implementation routine but does not propagate the return code.To Reproduce
More theoretical than real. In POSIX this depends on the underlying
pthread_setspecific()
routine returning an error, of which the only documented error (at least per POSIX) isENOMEM
. However that doesn't mean that there couldn't be other implementation-specific errors on other systems.Expected behavior
If the
OS_TaskRegister_Impl()
fails, this result should be propagated up the stack and prevent the task from starting.Code snips
See here:
osal/src/os/shared/src/osapi-task.c
Lines 117 to 125 in 8cfd6fe
System observed on:
Additional context
If this fails then it means dependent routines like
OS_TaskGetId()
will also be broken, so it really should block startup of the task and return the error to the caller. Catching this type of error early, when possible, is usually better than getting an obfuscated error later.Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: