提交 d626f62a 编写于 作者: wmmhello's avatar wmmhello

fix: fix coredump if mode function with interval

上级 a24a04c6
...@@ -332,7 +332,7 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO ...@@ -332,7 +332,7 @@ SSDataBlock* createOutputBuf(SExprInfo* pExpr, int32_t numOfOutput, int32_t numO
tmp *= numOfRows; tmp *= numOfRows;
if (tmp >= 1024*1024*1024) { // 1G if (tmp >= 1024*1024*1024) { // 1G
qError("size is too large, failed to allocate column buffer for output buffer"); qError("size is too large, failed to allocate column buffer for output buffer");
tmp = 128*1024*1024; goto _clean;
} }
int32_t size = (int32_t)MAX(tmp, minSize); int32_t size = (int32_t)MAX(tmp, minSize);
idata.pData = calloc(1, size); // at least to hold a pointer on x64 platform idata.pData = calloc(1, size); // at least to hold a pointer on x64 platform
...@@ -2131,7 +2131,7 @@ static int32_t setupQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv, int32_t numOf ...@@ -2131,7 +2131,7 @@ static int32_t setupQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv, int32_t numOf
pRuntimeEnv->sasArray = calloc(pQueryAttr->numOfOutput, sizeof(SScalarExprSupport)); pRuntimeEnv->sasArray = calloc(pQueryAttr->numOfOutput, sizeof(SScalarExprSupport));
if (pRuntimeEnv->sasArray == NULL || pRuntimeEnv->pResultRowHashTable == NULL || pRuntimeEnv->keyBuf == NULL || if (pRuntimeEnv->sasArray == NULL || pRuntimeEnv->pResultRowHashTable == NULL || pRuntimeEnv->keyBuf == NULL ||
pRuntimeEnv->prevRow == NULL || pRuntimeEnv->tagVal == NULL) { pRuntimeEnv->prevRow == NULL || pRuntimeEnv->tagVal == NULL || pRuntimeEnv->pool == NULL) {
goto _clean; goto _clean;
} }
......
...@@ -206,7 +206,7 @@ SResultRowPool* initResultRowPool(size_t size) { ...@@ -206,7 +206,7 @@ SResultRowPool* initResultRowPool(size_t size) {
tmp *= p->numOfElemPerBlock; tmp *= p->numOfElemPerBlock;
if (tmp > 1024*1024*1024){ if (tmp > 1024*1024*1024){
qError("ResultRow blockSize is too large:%" PRId64, tmp); qError("ResultRow blockSize is too large:%" PRId64, tmp);
tmp = 128*1024*1024; return NULL;
} }
p->blockSize = (int32_t)tmp; p->blockSize = (int32_t)tmp;
p->position.pos = 0; p->position.pos = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册