arm: fix backtrace busyloop
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b3ebe66ff5
commit
3a023f4d1a
@ -52,14 +52,13 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
|
|||||||
|
|
||||||
if (pc)
|
if (pc)
|
||||||
{
|
{
|
||||||
i++;
|
|
||||||
if ((*skip)-- <= 0)
|
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)
|
if (fp > limit || fp < base || *fp == 0)
|
||||||
{
|
{
|
||||||
@ -68,7 +67,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
|
|||||||
|
|
||||||
if ((*skip)-- <= 0)
|
if ((*skip)-- <= 0)
|
||||||
{
|
{
|
||||||
*buffer++ = (void *)*fp;
|
buffer[i++] = (void *)*fp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user