Merged in david_s5/nuttx-13/david_s5/as-discovered-by-dcabecinhas-this-fix-as-1489246417893 (pull request #264)

As discovered by dcabecinhas. This fix assume the 8 byte alignment options for size stack size or this will overwrite the first word after TOS

Approved-by: Gregory Nutt
This commit is contained in:
David Sidrane 2017-03-11 22:03:40 +00:00 committed by Gregory Nutt
commit 92b856f657

View File

@ -100,13 +100,13 @@ static void up_calibratedelay(void)
*
****************************************************************************/
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 7
static inline void up_color_intstack(void)
{
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
ssize_t size;
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
size > 0;
size -= sizeof(uint32_t))
{