未验证 提交 65790b67 编写于 作者: O openharmony_ci 提交者: Gitee

!937 拼写错误修正

Merge pull request !937 from yinjiaming/dev
......@@ -61,11 +61,11 @@ STATIC INLINE VOID OsSemDbgTimeUpdateHook(UINT32 semID)
return;
}
/* Update the SEM_DEBUG_CB of the semaphore when created or deleted */
extern VOID OsSemDbgUpdate(UINT32 semID, TSK_ENTRY_FUNC creater, UINT16 count);
STATIC INLINE VOID OsSemDbgUpdateHook(UINT32 semID, TSK_ENTRY_FUNC creater, UINT16 count)
extern VOID OsSemDbgUpdate(UINT32 semID, TSK_ENTRY_FUNC creator, UINT16 count);
STATIC INLINE VOID OsSemDbgUpdateHook(UINT32 semID, TSK_ENTRY_FUNC creator, UINT16 count)
{
#ifdef LOSCFG_DEBUG_SEMAPHORE
OsSemDbgUpdate(semID, creater, count);
OsSemDbgUpdate(semID, creator, count);
#endif
return;
}
......
......@@ -40,7 +40,7 @@
#ifdef LOSCFG_DEBUG_QUEUE
typedef struct {
TSK_ENTRY_FUNC creater; /* The task entry who created this queue */
TSK_ENTRY_FUNC creator; /* The task entry who created this queue */
UINT64 lastAccessTime; /* The last access time */
} QueueDebugCB;
STATIC QueueDebugCB *g_queueDebugArray = NULL;
......@@ -74,7 +74,7 @@ VOID OsQueueDbgTimeUpdate(UINT32 queueID)
VOID OsQueueDbgUpdate(UINT32 queueID, TSK_ENTRY_FUNC entry)
{
QueueDebugCB *queueDebug = &g_queueDebugArray[GET_QUEUE_INDEX(queueID)];
queueDebug->creater = entry;
queueDebug->creator = entry;
queueDebug->lastAccessTime = LOS_TickCountGet();
return;
}
......@@ -91,8 +91,8 @@ STATIC INLINE VOID OsQueueInfoOutPut(const LosQueueCB *node)
STATIC INLINE VOID OsQueueOpsOutput(const QueueDebugCB *node)
{
PRINTK("TaskEntry of creater:0x%p, Latest operation time: 0x%llx\n",
node->creater, node->lastAccessTime);
PRINTK("TaskEntry of creator:0x%p, Latest operation time: 0x%llx\n",
node->creator, node->lastAccessTime);
}
STATIC VOID SortQueueIndexArray(UINT32 *indexArray, UINT32 count)
......@@ -149,7 +149,7 @@ VOID OsQueueCheck(VOID)
&g_queueDebugArray[index], sizeof(QueueDebugCB));
SCHEDULER_UNLOCK(intSave);
if ((queueNode.queueState == OS_QUEUE_UNUSED) ||
((queueNode.queueState == OS_QUEUE_INUSED) && (queueDebugNode.creater == NULL))) {
((queueNode.queueState == OS_QUEUE_INUSED) && (queueDebugNode.creator == NULL))) {
continue;
}
if ((queueNode.queueState == OS_QUEUE_INUSED) &&
......
......@@ -80,7 +80,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode)
typedef struct {
UINT16 origSemCount; /* Number of original available semaphores */
UINT64 lastAccessTime; /* The last operation time */
TSK_ENTRY_FUNC creater; /* The task entry who created this sem */
TSK_ENTRY_FUNC creator; /* The task entry who created this sem */
} SemDebugCB;
STATIC SemDebugCB *g_semDebugArray = NULL;
......@@ -110,10 +110,10 @@ VOID OsSemDbgTimeUpdate(UINT32 semID)
return;
}
VOID OsSemDbgUpdate(UINT32 semID, TSK_ENTRY_FUNC creater, UINT16 count)
VOID OsSemDbgUpdate(UINT32 semID, TSK_ENTRY_FUNC creator, UINT16 count)
{
SemDebugCB *semDebug = &g_semDebugArray[GET_SEM_INDEX(semID)];
semDebug->creater = creater;
semDebug->creator = creator;
semDebug->lastAccessTime = LOS_TickCountGet();
semDebug->origSemCount = count;
return;
......@@ -133,7 +133,7 @@ STATIC VOID OsSemSort(UINT32 *semIndexArray, UINT32 usedCount)
/* It will Print out ALL the Used Semaphore List. */
PRINTK("Used Semaphore List: \n");
PRINTK("\r\n SemID Count OriginalCount Creater(TaskEntry) LastAccessTime\n");
PRINTK("\r\n SemID Count OriginalCount Creator(TaskEntry) LastAccessTime\n");
PRINTK(" ------ ------ ------------- ------------------ -------------- \n");
SCHEDULER_LOCK(intSave);
......@@ -145,11 +145,11 @@ STATIC VOID OsSemSort(UINT32 *semIndexArray, UINT32 usedCount)
(VOID)memcpy_s(&semNode, sizeof(LosSemCB), semCB, sizeof(LosSemCB));
(VOID)memcpy_s(&semDebug, sizeof(SemDebugCB), &g_semDebugArray[semIndexArray[i]], sizeof(SemDebugCB));
SCHEDULER_UNLOCK(intSave);
if ((semNode.semStat != OS_SEM_USED) || (semDebug.creater == NULL)) {
if ((semNode.semStat != OS_SEM_USED) || (semDebug.creator == NULL)) {
continue;
}
PRINTK(" 0x%-07x0x%-07u0x%-14u%-22p0x%llx\n", semNode.semID, semDebug.origSemCount,
semNode.semCount, semDebug.creater, semDebug.lastAccessTime);
semNode.semCount, semDebug.creator, semDebug.lastAccessTime);
if (!LOS_ListEmpty(&semNode.semList)) {
OsSemPendedTaskNamePrint(semCB);
}
......@@ -170,7 +170,7 @@ UINT32 OsSemInfoGetFullData(VOID)
for (i = 0; i < LOSCFG_BASE_IPC_SEM_LIMIT; i++) {
semNode = GET_SEM(i);
semDebug = &g_semDebugArray[i];
if ((semNode->semStat == OS_SEM_USED) && (semDebug->creater != NULL)) {
if ((semNode->semStat == OS_SEM_USED) && (semDebug->creator != NULL)) {
usedSemCnt++;
}
}
......@@ -190,7 +190,7 @@ UINT32 OsSemInfoGetFullData(VOID)
for (i = 0; i < LOSCFG_BASE_IPC_SEM_LIMIT; i++) {
semNode = GET_SEM(i);
semDebug = &g_semDebugArray[i];
if ((semNode->semStat != OS_SEM_USED) || (semDebug->creater == NULL)) {
if ((semNode->semStat != OS_SEM_USED) || (semDebug->creator == NULL)) {
continue;
}
*(semIndexArray + count) = i;
......
......@@ -498,7 +498,7 @@ STATIC INLINE VOID OsLmsReallocMergeNodeMark(struct OsMemNodeHead *node)
}
g_lms->simpleMark((UINTPTR)node + OS_MEM_NODE_HEAD_SIZE, (UINTPTR)OS_MEM_NEXT_NODE(node),
LMS_SHADOW_ACCESSABLE_U8);
LMS_SHADOW_ACCESSIBLE_U8);
}
STATIC INLINE VOID OsLmsReallocSplitNodeMark(struct OsMemNodeHead *node)
......
......@@ -326,7 +326,7 @@ VOID OsLmsLosMallocMark(const VOID *curNodeStart, const VOID *nextNodeStart, UIN
}
OsLmsSetShadowValue(node, curNodeStartAddr, curNodeStartAddr + nodeHeadSize, LMS_SHADOW_REDZONE_U8);
OsLmsSetShadowValue(node, curNodeStartAddr + nodeHeadSize, nextNodeStartAddr, LMS_SHADOW_ACCESSABLE_U8);
OsLmsSetShadowValue(node, curNodeStartAddr + nodeHeadSize, nextNodeStartAddr, LMS_SHADOW_ACCESSIBLE_U8);
OsLmsSetShadowValue(node, nextNodeStartAddr, nextNodeStartAddr + nodeHeadSize, LMS_SHADOW_REDZONE_U8);
LMS_UNLOCK(intSave);
}
......@@ -344,7 +344,7 @@ VOID OsLmsCheckValid(UINTPTR checkAddr, BOOL isFreeCheck)
OsLmsGetShadowValue(node, checkAddr, &shadowValue);
LMS_UNLOCK(intSave);
if ((shadowValue == LMS_SHADOW_ACCESSABLE) || ((isFreeCheck) && (shadowValue == LMS_SHADOW_PAINT))) {
if ((shadowValue == LMS_SHADOW_ACCESSIBLE) || ((isFreeCheck) && (shadowValue == LMS_SHADOW_PAINT))) {
return;
}
......@@ -367,7 +367,7 @@ VOID OsLmsLosFreeMark(const VOID *curNodeStart, const VOID *nextNodeStart, UINT3
UINTPTR nextNodeStartAddr = (UINTPTR)nextNodeStart;
OsLmsGetShadowValue(node, curNodeStartAddr + nodeHeadSize, &shadowValue);
if ((shadowValue != LMS_SHADOW_ACCESSABLE) && (shadowValue != LMS_SHADOW_PAINT)) {
if ((shadowValue != LMS_SHADOW_ACCESSIBLE) && (shadowValue != LMS_SHADOW_PAINT)) {
LMS_UNLOCK(intSave);
OsLmsReportError(curNodeStartAddr + nodeHeadSize, MEM_REGION_SIZE_1, FREE_ERRORMODE);
return;
......@@ -408,7 +408,7 @@ VOID LOS_LmsAddrDisableProtect(UINTPTR addrStart, UINTPTR addrEnd)
LMS_LOCK(intSave);
LmsMemListNode *node = OsLmsGetPoolNodeFromAddr(addrStart);
if (node != NULL) {
OsLmsSetShadowValue(node, addrStart, addrEnd, LMS_SHADOW_ACCESSABLE_U8);
OsLmsSetShadowValue(node, addrStart, addrEnd, LMS_SHADOW_ACCESSIBLE_U8);
}
LMS_UNLOCK(intSave);
}
......@@ -426,7 +426,7 @@ STATIC UINT32 OsLmsCheckAddr(UINTPTR addr)
LmsMemListNode *node = OsLmsGetPoolNodeFromAddr(addr);
if (node == NULL) {
LMS_UNLOCK(intSave);
return LMS_SHADOW_ACCESSABLE_U8;
return LMS_SHADOW_ACCESSIBLE_U8;
}
OsLmsGetShadowValue(node, addr, &shadowValue);
......@@ -542,7 +542,7 @@ STATIC VOID OsLmsGetErrorInfo(UINTPTR addr, UINT32 size, LmsAddrInfo *info)
{
LmsMemListNode *node = OsLmsGetPoolNodeFromAddr(addr);
OsLmsGetShadowInfo(node, addr, info);
if (info->shadowValue != LMS_SHADOW_ACCESSABLE_U8) {
if (info->shadowValue != LMS_SHADOW_ACCESSIBLE_U8) {
return;
} else {
OsLmsGetShadowInfo(node, addr + size - 1, info);
......@@ -558,7 +558,7 @@ STATIC VOID OsLmsPrintErrInfo(LmsAddrInfo *info, UINT32 errMod)
case LMS_SHADOW_REDZONE:
PRINT_ERR("Heap buffer overflow error detected\n");
break;
case LMS_SHADOW_ACCESSABLE:
case LMS_SHADOW_ACCESSIBLE:
PRINT_ERR("No error\n");
break;
default:
......@@ -614,7 +614,7 @@ VOID OsLmsReportError(UINTPTR p, UINT32 size, UINT32 errMod)
#ifdef LOSCFG_LMS_STORE_CHECK
VOID __asan_store1_noabort(UINTPTR p)
{
if (OsLmsCheckAddr(p) != LMS_SHADOW_ACCESSABLE_U8) {
if (OsLmsCheckAddr(p) != LMS_SHADOW_ACCESSIBLE_U8) {
OsLmsReportError(p, MEM_REGION_SIZE_1, STORE_ERRMODE);
}
}
......@@ -690,7 +690,7 @@ VOID __asan_storeN_noabort(UINTPTR p, UINT32 size)
#ifdef LOSCFG_LMS_LOAD_CHECK
VOID __asan_load1_noabort(UINTPTR p)
{
if (OsLmsCheckAddr(p) != LMS_SHADOW_ACCESSABLE_U8) {
if (OsLmsCheckAddr(p) != LMS_SHADOW_ACCESSIBLE_U8) {
OsLmsReportError(p, MEM_REGION_SIZE_1, LOAD_ERRMODE);
}
}
......
......@@ -59,13 +59,13 @@ extern "C" {
#define LMS_POOL_RESIZE(size) ((size) / (LMS_SHADOW_U8_REFER_BYTES + 1) * LMS_SHADOW_U8_REFER_BYTES)
#define LMS_ADDR_ALIGN(p) (((UINTPTR)(p) + sizeof(UINTPTR) - 1) & ~((UINTPTR)(sizeof(UINTPTR) - 1)))
#define LMS_SHADOW_ACCESSABLE 0x00
#define LMS_SHADOW_ACCESSIBLE 0x00
#define LMS_SHADOW_AFTERFREE 0x03
#define LMS_SHADOW_REDZONE 0x02
#define LMS_SHADOW_PAINT 0x01
#define LMS_SHADOW_MASK 0x03
#define LMS_SHADOW_ACCESSABLE_U8 0x00
#define LMS_SHADOW_ACCESSIBLE_U8 0x00
#define LMS_SHADOW_AFTERFREE_U8 0xFF
#define LMS_SHADOW_REDZONE_U8 0xAA
#define LMS_SHADOW_MASK_U8 0xFF
......
......@@ -174,7 +174,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS void LmsGetShadowValue(uintptr_t addr, uint32_t *s
LmsMem2Shadow(addr, &shadowAddr, &shadowOffset);
/* If the shadow addr is not mapped then regarded as legal access */
if (LmsIsShadowAddrMapped(shadowAddr, shadowAddr) != LMS_OK) {
*shadowValue = LMS_SHADOW_ACCESSABLE_U8;
*shadowValue = LMS_SHADOW_ACCESSIBLE_U8;
return;
}
......@@ -185,7 +185,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS void LmsMallocMark(uintptr_t preRzStart, uintptr_t
uintptr_t RzEndAddr)
{
LmsSetShadowValue(preRzStart, accessMemStart, LMS_SHADOW_REDZONE_U8);
LmsSetShadowValue(accessMemStart, nextRzStart, LMS_SHADOW_ACCESSABLE_U8);
LmsSetShadowValue(accessMemStart, nextRzStart, LMS_SHADOW_ACCESSIBLE_U8);
LmsSetShadowValue(nextRzStart, RzEndAddr, LMS_SHADOW_REDZONE_U8);
}
......@@ -300,7 +300,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS static inline void LmsGetShadowInfo(uintptr_t memA
ATTRIBUTE_NO_SANITIZE_ADDRESS static void LmsGetErrorInfo(uintptr_t addr, size_t size, LmsAddrInfo *info)
{
LmsGetShadowInfo(addr, info);
if (info->shadowValue != LMS_SHADOW_ACCESSABLE_U8) {
if (info->shadowValue != LMS_SHADOW_ACCESSIBLE_U8) {
return;
} else {
LmsGetShadowInfo(addr + size - 1, info);
......@@ -316,7 +316,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS static void LmsPrintErrInfo(LmsAddrInfo *info, uin
case LMS_SHADOW_REDZONE:
LMS_OUTPUT_ERROR("Heap buffer overflow error detected!\n");
break;
case LMS_SHADOW_ACCESSABLE:
case LMS_SHADOW_ACCESSIBLE:
LMS_OUTPUT_ERROR("No error!\n");
break;
default:
......@@ -343,7 +343,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS static void LmsPrintErrInfo(LmsAddrInfo *info, uin
info->shadowOffset, info->shadowValue);
LMS_OUTPUT_INFO("\n");
LMS_OUTPUT_INFO("%-25s%d\n", "Accessable heap addr", LMS_SHADOW_ACCESSABLE);
LMS_OUTPUT_INFO("%-25s%d\n", "Accessible heap addr", LMS_SHADOW_ACCESSIBLE);
LMS_OUTPUT_INFO("%-25s%d\n", "Heap red zone", LMS_SHADOW_REDZONE);
LMS_OUTPUT_INFO("%-25s%d\n", "Heap freed buffer", LMS_SHADOW_AFTERFREE);
LMS_OUTPUT_INFO("\n");
......@@ -373,23 +373,23 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS void LmsReportError(uintptr_t p, size_t size, uint
void LmsCheckValid(const char *dest, const char *src)
{
if (LmsCheckAddr((uintptr_t)dest) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr((uintptr_t)dest) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError((uintptr_t)dest, MEM_REGION_SIZE_1, STORE_ERRMODE);
return;
}
if (LmsCheckAddr((uintptr_t)src) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr((uintptr_t)src) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError((uintptr_t)src, MEM_REGION_SIZE_1, LOAD_ERRMODE);
return;
}
for (uint32_t i = 0; *(src + i) != '\0'; i++) {
if (LmsCheckAddr((uintptr_t)dest + i + 1) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr((uintptr_t)dest + i + 1) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError((uintptr_t)dest + i + 1, MEM_REGION_SIZE_1, STORE_ERRMODE);
return;
}
if (LmsCheckAddr((uintptr_t)src + i + 1) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr((uintptr_t)src + i + 1) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError((uintptr_t)src + i + 1, MEM_REGION_SIZE_1, LOAD_ERRMODE);
return;
}
......@@ -398,7 +398,7 @@ void LmsCheckValid(const char *dest, const char *src)
void __asan_store1_noabort(uintptr_t p)
{
if (LmsCheckAddr(p) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr(p) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError(p, MEM_REGION_SIZE_1, STORE_ERRMODE);
}
}
......@@ -440,7 +440,7 @@ void __asan_storeN_noabort(uintptr_t p, size_t size)
void __asan_load1_noabort(uintptr_t p)
{
if (LmsCheckAddr(p) != LMS_SHADOW_ACCESSABLE_U8) {
if (LmsCheckAddr(p) != LMS_SHADOW_ACCESSIBLE_U8) {
LmsReportError(p, MEM_REGION_SIZE_1, LOAD_ERRMODE);
}
}
......
......@@ -50,7 +50,7 @@ extern "C" {
#define SANITIZER_INTERFACE_ATTRIBUTE
#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#define LMS_SHADOW_ACCESSABLE 0x00
#define LMS_SHADOW_ACCESSIBLE 0x00
#define LMS_SHADOW_AFTERFREE 0x03
#define LMS_SHADOW_REDZONE 0x02
#define LMS_SHADOW_PAINT 0x01
......@@ -61,7 +61,7 @@ extern "C" {
#define LMS_SHADOW_U8_CELL_NUM 4
#define LMS_SHADOW_U8_REFER_BYTES 16
#define LMS_SHADOW_ACCESSABLE_U8 0x00
#define LMS_SHADOW_ACCESSIBLE_U8 0x00
#define LMS_SHADOW_AFTERFREE_U8 0xFF
#define LMS_SHADOW_REDZONE_U8 0xAA
#define LMS_SHADOW_MASK_U8 0xFF
......
......@@ -45,7 +45,7 @@ ATTRIBUTE_NO_SANITIZE_ADDRESS void LmsFree(void *ptr)
if (LmsIsShadowAddrMapped(shadowAddr, shadowAddr) == LMS_OK) {
uint32_t acShadowValue;
LmsGetShadowValue((uintptr_t)ptr, &acShadowValue);
if (acShadowValue != LMS_SHADOW_ACCESSABLE) {
if (acShadowValue != LMS_SHADOW_ACCESSIBLE) {
char erroMode = (acShadowValue == LMS_SHADOW_AFTERFREE ? FREE_ERRORMODE : UNKNOWN_ERROR);
LmsReportError((uintptr_t)ptr, MEM_REGION_SIZE_1, erroMode);
goto UNLOCK_OUT;
......
......@@ -263,7 +263,7 @@ SYSCALL_HAND_DEF(__NR_statx, SysStatx, int, ARG_NUM_5)
SYSCALL_HAND_DEF(__NR_pthread_set_detach, SysUserThreadSetDetach, int, ARG_NUM_1)
SYSCALL_HAND_DEF(__NR_pthread_join, SysThreadJoin, int, ARG_NUM_1)
SYSCALL_HAND_DEF(__NR_pthread_deatch, SysUserThreadDetach, int, ARG_NUM_1)
SYSCALL_HAND_DEF(__NR_creat_user_thread, SysCreateUserThread, unsigned int, ARG_NUM_3)
SYSCALL_HAND_DEF(__NR_create_user_thread, SysCreateUserThread, unsigned int, ARG_NUM_3)
SYSCALL_HAND_DEF(__NR_getrusage, SysGetrusage, int, ARG_NUM_2)
SYSCALL_HAND_DEF(__NR_sysconf, SysSysconf, long, ARG_NUM_1)
SYSCALL_HAND_DEF(__NR_ugetrlimit, SysUgetrlimit, int, ARG_NUM_2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册