fix: Memory detection in macro definition

This commit is contained in:
xsren 2024-09-18 09:18:30 +08:00
parent f684e12c27
commit e87bd926da
1 changed files with 4 additions and 1 deletions

View File

@ -81,8 +81,11 @@ int32_t taosResetTerminalMode();
unw_get_reg(&cursor, UNW_REG_IP, &pc); \
fname[0] = '\0'; \
(void)unw_get_proc_name(&cursor, fname, sizeof(fname), &offset); \
size += 1; \
array[size] = (char *)taosMemoryMalloc(sizeof(char) * STACKSIZE + 1); \
if(NULL == array[size]) { \
break; \
} \
size += 1; \
snprintf(array[size], STACKSIZE, "0x%lx : (%s+0x%lx) [0x%lx]\n", (long)pc, fname, (long)offset, (long)pc); \
} \
if (ignoreNum < size && size > 0) { \