diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index 58f665779702c37379cbdf243f45fe38a06c0872..4646854889e177460652b60b9a701e2ad1053727 100755 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -1138,6 +1138,7 @@ __attribute__((noinline)) VOID LOS_Panic(const CHAR *fmt, ...) UartVprintf(fmt, ap); va_end(ap); __asm__ __volatile__("swi 0"); + while (1); } /* stack protector */ diff --git a/arch/arm/include/los_exc.h b/arch/arm/include/los_exc.h index 807bcb2fad1db91571b8a0951118c9cd9e910440..980e7af17dbaf0a063b5e218403bfb2dab64b746 100755 --- a/arch/arm/include/los_exc.h +++ b/arch/arm/include/los_exc.h @@ -183,7 +183,7 @@ extern UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook); * los_exc.h: the header file that contains the API declaration. * @see None. */ -VOID LOS_Panic(const CHAR *fmt, ...); +VOID LOS_Panic(const CHAR *fmt, ...) __attribute__ ((noreturn)); /** * @ingroup los_exc