!323 fix: 修复内核堆完整性检查逻辑中访问非法指针导致系统异常问题。
Merge pull request !323 from Harylee/mem
This commit is contained in:
commit
b8e18ffdf1
|
@ -1595,10 +1595,12 @@ STATIC VOID OsMemPoolHeadCheck(const struct OsMemPoolHead *pool)
|
||||||
flag = 1;
|
flag = 1;
|
||||||
PRINT_ERR("FreeListIndex: %u, node: %#x, bNode: %#x, prev: %#x, next: %#x\n",
|
PRINT_ERR("FreeListIndex: %u, node: %#x, bNode: %#x, prev: %#x, next: %#x\n",
|
||||||
index, tmpNode, tmpNode->header.ptr.prev, tmpNode->prev, tmpNode->next);
|
index, tmpNode, tmpNode->header.ptr.prev, tmpNode->prev, tmpNode->next);
|
||||||
|
goto OUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OUT:
|
||||||
if (flag) {
|
if (flag) {
|
||||||
PRINTK("mem pool info: poolAddr: %#x, poolSize: 0x%x\n", pool, pool->info.totalSize);
|
PRINTK("mem pool info: poolAddr: %#x, poolSize: 0x%x\n", pool, pool->info.totalSize);
|
||||||
#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
|
#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
|
||||||
|
|
|
@ -1135,7 +1135,7 @@ DONE:
|
||||||
|
|
||||||
LosMux *OsGVmSpaceMuxGet(VOID)
|
LosMux *OsGVmSpaceMuxGet(VOID)
|
||||||
{
|
{
|
||||||
return &g_vmSpaceListMux;
|
return &g_vmSpaceListMux;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC INLINE BOOL OsMemLargeAlloc(UINT32 size)
|
STATIC INLINE BOOL OsMemLargeAlloc(UINT32 size)
|
||||||
|
|
Loading…
Reference in New Issue