davids5 commented on a change in pull request #1369:
URL: https://github.com/apache/incubator-nuttx/pull/1369#discussion_r452756558



##########
File path: arch/arm/src/arm/arm_initialstate.c
##########
@@ -52,13 +52,7 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
+#define IDLETHREAD_STACKMARGIN    128

Review comment:
       @Ouss4 
   
   > "\tmov r1, r1, lsr #2\n" /* R1 = nwords = nbytes >> 2 */
   
   That is the the stack size in bytes being converted to words then aligned on 
a word boundary.
   
   The code then jumps with a completely "colored" stack to nx_start
   
   The PR will not do the same thing. It is coloring the stack it is running 
on. When the stack to be colored is the stack you are running on you can take 
the address of a last stack var (defined volatile) in the called routine and 
and treat that as the end of the write. The  oversize guess will not show true 
penetration. It will show running off the end, but you can do that with a guard 
block.
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to