xiaoxiang781216 commented on a change in pull request #1369:
URL: https://github.com/apache/incubator-nuttx/pull/1369#discussion_r487147789
##########
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:
> > ping again, @davids5 this patch is pending for more than two months,
could you answer my question a little bit timely?
>
> What I suggested will work, you understanding it may not. This will safely
get the the margin. Why don't you try it,
Yes, I want to try, but it can't work and I have give my answer two months
ago, but you ignore it silently. So I have to copy my response here again,
please you give me your comment one by one, so I can try with your new propose:
1.Many arch don't have xxx_stack_color, but call memset directly, then we
have to add some margin again for memset. Here is an example:
```
#ifdef CONFIG_STACK_COLORATION
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
#endif
```
Pleaase tell me how can I measure memset stack consumption with your method?
Do you want me to add the marker into memset?
2.The code isn't portable at least in the theory, because the compiler
permit to move "register real vars...;" out of the marker or add more tempary
variables as need. Especially, if we enable some advance feature(e.g.
AddressSanitizer, Stack Smashing Protector). Please read the related document
to understand what will happen behind the scene with the memory layout if you
aren't fimilar with these technique.
Actually before I made the change in this way, I have consider your propose
carefully and give up finally due the reason I mention previously.
----------------------------------------------------------------
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:
[email protected]