Hello.
I found an issue with the FTPSRV_init function of RTCS in MQX 4.1.1.
The function uses RTCS_mem_alloc_zero to allocate memory for its FTPSRV_STRUCT, the session pointer and session task ID's.
However if this function is called from a task (e.g. an initialization task) that runs out normally then the allocated memory is freed in _task_destroy.
Now, if an other task allocateds memory, it is possible that the session struct and semaphores are overwritten in memory while the ftp task is running.
This leads to exceptions in various other tasks that are using semaphores also because the LWSEM list of the kernel data is now broken.
To make a long story short, I think that FTPSRV_init should use RTCS_MEM_alloc_system_zero to allocate memory.
Solved! Go to Solution.
Hi,
this issue is already solved in MQX+SDK 1.1.0 release and fix will also be part of next MQX release (MQX 4.2).
Best regards,
Karel
In general, if you have an initialisation task that allocates memory or other objects, either directly or via calls to other modules, then it is a good idea not to let that initialisation task expire but to just call _task_block() at its conclusion.
Hi,
this issue is already solved in MQX+SDK 1.1.0 release and fix will also be part of next MQX release (MQX 4.2).
Best regards,
Karel
Thats what I mean with a list of known issues.
It took two days for me to find that 'KNOWN' issue.