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
We had a situation where the API ut_kvp_getListCount has been triggered with some wrong profiles which will eventually fail. But the problem here is that the var count is not initialized due to which it generates a random value instead of zero during the failure. This random value created infinite loops in some of the VTS test cases.
Failure:
if (fy_node_is_sequence(node)) at line 600 fails due to some bad reason and as the count variable is not initialized, it will return a random value from here.
Solution: initialize the variable count to 0.
Please also check that the count is of type "uint32_t ", while we check this for -1 in certain cases.
count=fy_node_sequence_item_count(node);
if (count==-1)
{
UT_LOG_ERROR("fy_node_sequence_item_count() returned error\n ");
return0;
}
The text was updated successfully, but these errors were encountered:
Ulrond
changed the title
ut_kvp_getListCount failure due to random count value.
i42: ut-core: ut_kvp_getListCount failure due to random count value.
Sep 9, 2024
We had a situation where the API ut_kvp_getListCount has been triggered with some wrong profiles which will eventually fail. But the problem here is that the var count is not initialized due to which it generates a random value instead of zero during the failure. This random value created infinite loops in some of the VTS test cases.
Failure:
if (fy_node_is_sequence(node)) at line 600 fails due to some bad reason and as the count variable is not initialized, it will return a random value from here.
Solution: initialize the variable count to 0.
Please also check that the count is of type "uint32_t ", while we check this for -1 in certain cases.
The text was updated successfully, but these errors were encountered: