<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RL-ARM: &amp;quot;stack overflow&amp;quot; depending on task creation order?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37410/rl-arm-stack-overflow-depending-on-task-creation-order</link><description> 
My ARM7 software is using the RT environment of RL-ARM. 

 
After adding a new tiny task Task8 to the previous 7 tasks,
&amp;quot;os_stk_overflow&amp;quot; is called with the &amp;quot;task_id&amp;quot; pointing to Task8. 

 
- Reducing the amount of code in Task 8 does not fix it (I</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RL-ARM: "stack overflow" depending on task creation order?</title><link>https://community.arm.com/thread/88486?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2007 06:13:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9f36692a-9a69-44f9-b7b9-fe6120fcb675</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
Most likely one of the other 7 tasks is over writing a section of
memory that includes the signature portion of
task8&amp;acirc;&amp;euro;&amp;trade;s stack. Changing the order of creation is
changing the location that is being over written.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM: "stack overflow" depending on task creation order?</title><link>https://community.arm.com/thread/48498?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2007 02:18:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:08eb03b8-9b83-4072-a665-6db03f386046</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Reducing the code size in general does not help, however reducing
the &lt;b&gt;local variables&lt;/b&gt; does. Maybe you have an array or a big
structure declared in Task8.&lt;/p&gt;

&lt;p&gt;
The stack overflow detection is not a 100% reliable, it might also
fail. This is because the Stack Pointer and a signature value are
checked on a task switch.&lt;/p&gt;

&lt;p&gt;
Check local variables for all of your tasks and move big
structures and arrays to global. This will not change the RAM
requirements, but will avoid such problems that you have.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>