From 0de21341f9ee2fcf6292afc816ffacdab79b85f3 Mon Sep 17 00:00:00 2001 From: Shell Date: Fri, 3 Mar 2023 11:51:21 +0800 Subject: [fix] mm bugs (#7010) * [fix] implementation fault on avl * [fix] mm may free varea allocated statically * [test] add test and benchmark for avl --- libcpu/aarch64/common/mmu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcpu') diff --git a/libcpu/aarch64/common/mmu.c b/libcpu/aarch64/common/mmu.c index b97eb1eb6b..83073a6314 100644 --- a/libcpu/aarch64/common/mmu.c +++ b/libcpu/aarch64/common/mmu.c @@ -205,6 +205,8 @@ void *rt_hw_mmu_map(rt_aspace_t aspace, void *v_addr, void *p_addr, size_t size, if (ret != 0) { + /* other types of return value are taken as programming error */ + RT_ASSERT(ret == MMU_MAP_ERROR_NOPAGE); /* error, undo map */ while (unmap_va != v_addr) { -- cgit v1.3.1