Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vQueueAddToRegistry should not be called if name== NULL #49

Closed
giso-c opened this issue Apr 16, 2021 · 2 comments
Closed

vQueueAddToRegistry should not be called if name== NULL #49

giso-c opened this issue Apr 16, 2021 · 2 comments
Assignees

Comments

@giso-c
Copy link

giso-c commented Apr 16, 2021

In following code

#if (configQUEUE_REGISTRY_SIZE > 0)
if (hMutex != NULL) {
if (attr != NULL) {
name = attr->name;
} else {
name = NULL;
}
vQueueAddToRegistry (hMutex, name);
}
#endif

vQueueAddToRegistry is called even when name == NULL but it should not as in vQueueAddToRegistry , name == NULL is used to define a free slot, In latest code of freertos an assert has been added
void vQueueAddToRegistry( QueueHandle_t xQueue,
const char * pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
{
UBaseType_t ux;

    configASSERT( xQueue );
    configASSERT( pcQueueName );

We have same issue for other call to vQueueAddToRegistry

@paulbartell
Copy link

I rolled back the change to the FreeRTOS Kernel to maintain backwards compatibility in commits 46f7feba815b49fca5f5884304a465844812f1ef and 71f5af4e0f8d5fad2c4d83c43aa6748eb6cfaaf9.

Calling vQueueAddToRegistry with a NULL pcQueueName parameter will no longer result in an assertion, but will also no longer result in an invalid item added to the Queue Registry.

@VladimirUmek
Copy link
Collaborator

Hi,
thank you for reporting this issue. The CMSIS RTOS2 wrapper has been modified and will now no longer call vQueueAddToRegistry when name argument is NULL. Please check referenced commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants