mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-17 02:13:30 +00:00
kasantest.c: fix the size passed by mm_initialize is incorrect
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
8fc7004f5b
commit
1fb3687eaa
1 changed files with 3 additions and 3 deletions
|
|
@ -294,20 +294,20 @@ static bool test_algorithm_perf(FAR struct mm_heap_s *heap, size_t size)
|
|||
#ifdef CONFIG_MM_KASAN_GLOBAL
|
||||
static bool test_global_underflow(FAR struct mm_heap_s *heap, size_t size)
|
||||
{
|
||||
memset(g_kasan_globals - 31, 0x12, sizeof(g_kasan_globals));
|
||||
memset(g_kasan_globals - 1, 0x12, sizeof(g_kasan_globals));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool test_global_overflow(FAR struct mm_heap_s *heap, size_t size)
|
||||
{
|
||||
memset(g_kasan_globals, 0xef, sizeof(g_kasan_globals) + 31);
|
||||
memset(g_kasan_globals + sizeof(g_kasan_globals), 0xef, 1);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int run_test(FAR const testcase_t *test)
|
||||
{
|
||||
size_t heap_size = sizeof(g_kasan_heap);
|
||||
size_t heap_size = sizeof(g_kasan_heap) - sizeof(run_t);
|
||||
FAR char *argv[3];
|
||||
FAR run_t *run;
|
||||
int status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue