arm: fix backtrace busyloop
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b3ebe66ff5
commit
3a023f4d1a
1 changed files with 3 additions and 4 deletions
|
@ -52,14 +52,13 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
|
|||
|
||||
if (pc)
|
||||
{
|
||||
i++;
|
||||
if ((*skip)-- <= 0)
|
||||
{
|
||||
*buffer++ = pc;
|
||||
buffer[i++] = pc;
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < size; fp = (uintptr_t *)*(fp - 1), i++)
|
||||
for (; i < size; fp = (uintptr_t *)*(fp - 1))
|
||||
{
|
||||
if (fp > limit || fp < base || *fp == 0)
|
||||
{
|
||||
|
@ -68,7 +67,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
|
|||
|
||||
if ((*skip)-- <= 0)
|
||||
{
|
||||
*buffer++ = (void *)*fp;
|
||||
buffer[i++] = (void *)*fp;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue