From e82b55a4d8040b528992d062dd384752869e2321 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 7 Oct 2008 23:05:56 +0000 Subject: [PATCH] Fix tests for SP in interrupt stack range git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@994 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/common/up_assert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/common/up_assert.c b/arch/arm/src/common/up_assert.c index 1790225c2b..ac6906c709 100644 --- a/arch/arm/src/common/up_assert.c +++ b/arch/arm/src/common/up_assert.c @@ -185,7 +185,7 @@ static void up_dumpstate(void) * stack? */ - if (sp <= istackbase && sp < istackbase - istacksize) + if (sp <= istackbase && sp > istackbase - istacksize) { /* Yes.. dump the interrupt stack */ @@ -214,7 +214,7 @@ static void up_dumpstate(void) * stack memory. */ - if (sp >= ustackbase || sp < ustackbase - ustacksize) + if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 lldbg("ERROR: Stack pointer is not within allocated stack\n");