Closed chengguizi closed 3 years ago
To verify, I have create a commit 2a5a6339d15e633b93a4563daf5a814dd622af66 , with CONFIG_DEBUG_ASSERTIONS
disabled.
Alternatively, to prove my point, one can enable CONFIG_DEBUG_ASSERTIONS
while ensuring that there is no set
or unset
command within the rcS script. Please refer to commit fb6dc1406627a74baff5cda93b6d0de821178b8f
This issue should be considered solved
https://nuttx.apache.org/docs/10.0.1/reference/user/05_counting_semaphore.html is a good reference to read up more about the priority inheritence and pre-allocated holders concepts.
The code failed at
DEBUGASSERT(pholder != NULL);
, whenever environment variable is used within thercS
script.The issue seems to be that the assertion is overly conservative, in such a way that nullptr is not allowed to be returned. But in fact, the place where this logic is used, there is a condition check for nullptr
Hence, I suggest to disable
CONFIG_DEBUG_ASSERTIONS
in the defconfig file.