<?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>Kinetis Design Studio中的主题 Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645079#M8385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dave,&lt;/P&gt;&lt;P&gt;I'm so sorry reply you so late.&lt;/P&gt;&lt;P&gt;Below is the explanation KDS compiler expert give :&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Yes you are right, malloc doesn't return NULL pointer when it overrun the heap size. I would not expect it, but after analyzing different situations it showed up, that malloc() returns NULL pointer only if there is not enough space neither in HEAP nor in STACK. I found this discussion on StackOverflow forum: &lt;BR /&gt; &lt;A class="" href="http://stackoverflow.com/questions/39113658/when-does-malloc-return-null-in-a-bare-metal-environment" rel="nofollow" title="Follow link"&gt;http://stackoverflow.com/questions/39113658/when-does-malloc-return-null-in-a-bare-metal-environment&lt;/A&gt;&lt;BR /&gt; They are talking about the HEAP and STACK collision, what could be related with this problem. Although, i am not sure if we can talk about collision even if both (STACK and HEAP) address ranges are managed. For example if i define an local array with 10 integers it will occupy cca 40-48 bytes at the top of the STACK. It means that this part of stack is not available for dynamic allocation and malloc() returns NULL if you try to allocate address space bigger than HEAP+STACK-48bytes. In my project 0x400 + 0x500 - 48bytes(mentioned array) - other local variables.&lt;BR /&gt; This is the reason why i think that malloc function works safely and it cannot happen that the dynamic allocation will overwrite some variables in stack.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice Yang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 10:08:06 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2017-02-17T10:08:06Z</dc:date>
    <item>
      <title>BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645078#M8384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple example (created by pruning down an NXP blinky example) shows malloc over-running heap and returning an invalid pointer. Obviously this corrupts memory in any non-trivial program.&lt;BR /&gt;KDS 3.2, Freedom K64F board.&lt;BR /&gt;Two bugs are illustrated:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;malloc is supposed to return NULL when no memory is available.&lt;BR /&gt;Please see: &lt;A _jive_internal="true" class="" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.cplusplus.com%2Freference%2Fcstdlib%2Fmalloc%2F" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.cplusplus.com/reference/cstdlib/malloc/&lt;/A&gt;&lt;BR /&gt;For embedded applications, a trap on out-of-memory would be better!&lt;BR /&gt;In no case is returning a pointer outside the heap acceptable.&lt;/LI&gt;&lt;LI&gt;As shown in this example, the default heap size of 1kB (for a processor with 256kB RAM!)&lt;BR /&gt;in K64F example is too small for even a trivial RTL use, even before the application tries to use malloc.&lt;BR /&gt;NXP examples should set sensible default heap size!&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's the relevant test code (complete project is attached):&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;// Quick-and-Dirty Blinky7 example for Freedom K64F
&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;// Shows malloc memory over-run and return of invalid (non-NULL) pointer&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;// Debug only:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;#include &amp;lt;stdio.h&amp;gt; // printf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;#include &amp;lt;stdlib.h&amp;gt; // malloc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;extern uint32_t __HeapBase;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;extern uint32_t __HeapLimit;&lt;/SPAN&gt;&lt;BR /&gt;// ....&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;int main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOARD_InitPins();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BOARD_BootClockRUN();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Hello there; this tests semi-hosting (and printf internally calls _malloc_r, and over-runs heap)\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void* pHeapBase = ((void*)&amp;amp;__HeapBase);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void* pHeapLimit= ((void*)&amp;amp;__HeapLimit);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void* pMalloc = malloc(16); // does malloc return something within expected heap area? Ooops: 0x200005c0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Heap: base 0x%x, limit 0x%x, very first malloc 0x%x\n",pHeapBase, pHeapLimit, pMalloc);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Prints: Heap: base 0x20000000, limit 0x20000400, very first malloc 0x200005c0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; assert (pMalloc&amp;gt;=pHeapBase &amp;amp;&amp;amp; pMalloc&amp;lt;pHeapLimit);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338481" rel="nofollow noopener noreferrer" target="_blank"&gt;20161228_malloc_overrun_demo.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 13:18:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645078#M8384</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2016-12-28T13:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645079#M8385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dave,&lt;/P&gt;&lt;P&gt;I'm so sorry reply you so late.&lt;/P&gt;&lt;P&gt;Below is the explanation KDS compiler expert give :&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Yes you are right, malloc doesn't return NULL pointer when it overrun the heap size. I would not expect it, but after analyzing different situations it showed up, that malloc() returns NULL pointer only if there is not enough space neither in HEAP nor in STACK. I found this discussion on StackOverflow forum: &lt;BR /&gt; &lt;A class="" href="http://stackoverflow.com/questions/39113658/when-does-malloc-return-null-in-a-bare-metal-environment" rel="nofollow" title="Follow link"&gt;http://stackoverflow.com/questions/39113658/when-does-malloc-return-null-in-a-bare-metal-environment&lt;/A&gt;&lt;BR /&gt; They are talking about the HEAP and STACK collision, what could be related with this problem. Although, i am not sure if we can talk about collision even if both (STACK and HEAP) address ranges are managed. For example if i define an local array with 10 integers it will occupy cca 40-48 bytes at the top of the STACK. It means that this part of stack is not available for dynamic allocation and malloc() returns NULL if you try to allocate address space bigger than HEAP+STACK-48bytes. In my project 0x400 + 0x500 - 48bytes(mentioned array) - other local variables.&lt;BR /&gt; This is the reason why i think that malloc function works safely and it cannot happen that the dynamic allocation will overwrite some variables in stack.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice Yang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 10:08:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645079#M8385</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-02-17T10:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645080#M8386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;NXP examples should set sensible default heap size!"&lt;BR /&gt;&lt;BR /&gt;According to safety standards such as MISRA the correct heap size is always zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;It is saying the heap shall never be used in Embedded projects, due to such things as fragmentation that can appear only with time making systems impossible to test.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.misra.org.uk/" style="color: #2989c5;" title="https://www.misra.org.uk/"&gt;https://www.misra.org.uk/&lt;/A&gt;&amp;nbsp;&lt;A href="https://www.misra.org.uk/" style="color: #660099; background-color: #ffffff; font-size: 18px;"&gt;The Motor Industry Software Reliability Association&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The point is what is 'reasonable' in one project is dangerous in an other.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;In my view the correct default behavior for any tool set is always start with heap size of zero and malloc and friends return NULL. &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;This forces the user to determine and set an appropriate heap size for their project then adjust the linker script as required.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://www.embedded.com/design/debug-and-optimization/4394132/Mastering-stack-and-heap-for-system-reliability--Part-1---Calculating-stack-size" title="http://www.embedded.com/design/debug-and-optimization/4394132/Mastering-stack-and-heap-for-system-reliability--Part-1---Calculating-stack-size"&gt;Mastering stack and heap for system reliability: Part 1 – Calculating stack size | Embedded&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://www.embedded.com/design/debug-and-optimization/4397656/Mastering-stack-and-heap-for-system-reliability--Part-2---Properly-allocating-stacks" title="http://www.embedded.com/design/debug-and-optimization/4397656/Mastering-stack-and-heap-for-system-reliability--Part-2---Properly-allocating-stacks"&gt;Mastering stack and heap for system reliability: Part 2 - Properly allocating stacks | Embedded&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://www.embedded.com/design/debug-and-optimization/4398519/Mastering-stack-and-heap-for-system-reliability--Part-3--Avoiding-heap-errors" title="http://www.embedded.com/design/debug-and-optimization/4398519/Mastering-stack-and-heap-for-system-reliability--Part-3--Avoiding-heap-errors"&gt;Mastering stack and heap for system reliability: Part 3 - Avoiding heap errors | Embedded&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;A class="link-titled" href="https://barrgroup.com/Embedded-Systems/How-To/Prevent-Detect-Stack-Overflow" title="https://barrgroup.com/Embedded-Systems/How-To/Prevent-Detect-Stack-Overflow"&gt;How to Prevent and Detect Stack Overflow | Barr Group&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 13:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645080#M8386</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2017-02-17T13:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645081#M8387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When develop on bare mental environment , it seems we need implement an _sbrk function&lt;/P&gt;&lt;P&gt;by yourself, I seared some example , you bring them as reference :&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://stackoverflow.com/questions/41977122/malloc-doesnt-return-null-when-overruns-the-heap-bare-metal?noredirect=1&amp;amp;lq=1" title="http://stackoverflow.com/questions/41977122/malloc-doesnt-return-null-when-overruns-the-heap-bare-metal?noredirect=1&amp;amp;lq=1"&gt;c - malloc() doesn't return null when overruns the HEAP (bare-metal) - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/SuperHouse/esp-open-rtos/issues/76" title="https://github.com/SuperHouse/esp-open-rtos/issues/76"&gt;malloc doesn't return NULL when run out of heap · Issue #76 · SuperHouse/esp-open-rtos · GitHub&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 09:10:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645081#M8387</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-02-28T09:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645082#M8388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See page 498 here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pubs.opengroup.org/onlinepubs/9695969499/toc.pdf" title="http://pubs.opengroup.org/onlinepubs/9695969499/toc.pdf"&gt;http://pubs.opengroup.org/onlinepubs/9695969499/toc.pdf&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A simplistic incomplete and dangerous version:&lt;BR /&gt;&lt;BR /&gt;/* ------------------------------------------------------------------------------------&lt;BR /&gt; * _sbrk(len) -- Allocate space on the heap&lt;/P&gt;&lt;P&gt;* Return -1 if there is no heap or no heap space.&lt;BR /&gt; */&lt;BR /&gt;extern char __heap_start[]; /* Defined by the linker script */&lt;BR /&gt;static char *heap_end = __heap_start; /* Start with empty heap */&lt;/P&gt;&lt;P&gt;char *_sbrk(int const incr); /* Amount to increases heap size */&lt;BR /&gt;char *_sbrk(int const incr)&lt;BR /&gt;{&lt;BR /&gt; heap_end += incr; /* \todo check for collisions with the stack [See below how to read SP in GCC]*/&lt;/P&gt;&lt;P&gt;return( (heap_end - incr) );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; */&lt;BR /&gt;static __inline__ void *sp_get(void)/* Return the current stack pointer */&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; void *sp;&lt;/P&gt;&lt;P&gt;__asm__ __volatile__ ("mrs %0, msp" : "=r"(sp));&lt;/P&gt;&lt;P&gt;return( sp );&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:50:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645082#M8388</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2017-02-28T15:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: malloc overruns heap, returns invalid pointer, and corrupts memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645083#M8389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Numerous examples from Freescale/NXP set up heap incorrectly for newlib.&lt;BR /&gt;Examples for FreeRTOS also do not configure FreeRTOS correctly (if you are using anything requiring heap, for example printf using floating point).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the following for detailed explanation, plus code and link file that actually work for FreeRTOS:&lt;BR /&gt;&lt;A href="http://www.nadler.com/embedded/newlibAndFreeRTOS.html"&gt;How to safely use newlib with FreeRTOS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 17:50:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/BUG-malloc-overruns-heap-returns-invalid-pointer-and-corrupts/m-p/645083#M8389</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2017-11-02T17:50:48Z</dc:date>
    </item>
  </channel>
</rss>

