assert: disable kasan in assert

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Xu Xingliang 2024-05-28 11:39:16 +08:00 committed by Xiang Xiao
parent 5fb56f6d95
commit 2749736638
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,7 @@
#include <nuttx/reboot_notifier.h> #include <nuttx/reboot_notifier.h>
#include <nuttx/syslog/syslog.h> #include <nuttx/syslog/syslog.h>
#include <nuttx/usb/usbdev_trace.h> #include <nuttx/usb/usbdev_trace.h>
#include <nuttx/mm/kasan.h>
#include <assert.h> #include <assert.h>
#include <debug.h> #include <debug.h>
@ -602,6 +603,10 @@ void _assert(FAR const char *filename, int linenum,
if (os_ready && fatal) if (os_ready && fatal)
{ {
/* Disable KASAN to avoid false positive */
kasan_stop();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
pause_all_cpu(); pause_all_cpu();
#endif #endif