patacongo opened a new issue #3241:
URL: https://github.com/apache/incubator-nuttx/issues/3241


   It appears that the stack size used in up_create_stack and up_use_stack 
includes the size of the TLS data.  This seems to be the case in all 
architectures except for ARM where the issue has been fixe.  For ARM,
   ```
     tls_size   = INT32_ALIGN_UP(sizeof(struct tls_info_s));
     alloc_size = STACK_ALIGN_UP(stack_size + tls_size);
     stack_size = alloc_size - tls_size;
   ```
   Where alloc_size is the size of the allocated memory and stack_size is the 
raw, unaligned size that will be saved and which will be colorized.
   
   For other architectures:
   ```
     stack_size += sizeof(struct tls_info_s);
   ```
   Where stack_ size is the size of the allocated memory and is also the raw, 
unaligned size that will be saved and which will be used for stack checking.  
Am I missing something here?
   


-- 
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]


Reply via email to