<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software SolutionsのトピックMQX 4.1.1. FTPSRV_init memory allocation</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390543#M13040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I found an issue with the FTPSRV_init function of RTCS in MQX 4.1.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function uses RTCS_mem_alloc_zero to allocate memory for its FTPSRV_STRUCT, the session pointer and session task ID's.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This leads to exceptions in various other tasks that are using semaphores also because the LWSEM list of the kernel data is now broken.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make a long story short, I think that FTPSRV_init should use RTCS_MEM_alloc_system_zero to allocate memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2014 06:39:15 GMT</pubDate>
    <dc:creator>CorderBollie</dc:creator>
    <dc:date>2014-10-15T06:39:15Z</dc:date>
    <item>
      <title>MQX 4.1.1. FTPSRV_init memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390543#M13040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I found an issue with the FTPSRV_init function of RTCS in MQX 4.1.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function uses RTCS_mem_alloc_zero to allocate memory for its FTPSRV_STRUCT, the session pointer and session task ID's.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This leads to exceptions in various other tasks that are using semaphores also because the LWSEM list of the kernel data is now broken.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make a long story short, I think that FTPSRV_init should use RTCS_MEM_alloc_system_zero to allocate memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 06:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390543#M13040</guid>
      <dc:creator>CorderBollie</dc:creator>
      <dc:date>2014-10-15T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1.1. FTPSRV_init memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390544#M13041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Karel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 12:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390544#M13041</guid>
      <dc:creator>karelm_</dc:creator>
      <dc:date>2014-10-15T12:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1.1. FTPSRV_init memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390545#M13042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats what I mean with a list of known issues.&lt;/P&gt;&lt;P&gt;It took two days for me to find that 'KNOWN' issue.&lt;/P&gt;&lt;P&gt;(&lt;A href="https://community.nxp.com/thread/332178"&gt;List of known bugs/issues&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 13:08:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390545#M13042</guid>
      <dc:creator>CorderBollie</dc:creator>
      <dc:date>2014-10-15T13:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1.1. FTPSRV_init memory allocation</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390546#M13043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 18:40:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-1-FTPSRV-init-memory-allocation/m-p/390546#M13043</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-10-15T18:40:36Z</dc:date>
    </item>
  </channel>
</rss>

