Merge pull request #638 from AubrCool/fix-stack.check

[src] scheduler update stackcheck
This commit is contained in:
Bernard Xiong 2016-06-02 11:59:19 +08:00
commit 7db31229bf
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,8 @@ static void _rt_scheduler_stack_check(struct rt_thread *thread)
{
RT_ASSERT(thread != RT_NULL);
if ((rt_uint32_t)thread->sp <= (rt_uint32_t)thread->stack_addr ||
if (*((rt_uint8_t *)thread->stack_addr) != '#' ||
(rt_uint32_t)thread->sp <= (rt_uint32_t)thread->stack_addr ||
(rt_uint32_t)thread->sp >
(rt_uint32_t)thread->stack_addr + (rt_uint32_t)thread->stack_size)
{