You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-5464: Fixes of bugs from ASAN warnings, part one (#2792)
* Fixes of bugs from ASAN warnings, part one * MQC as static library, with nifty counter for global map and mutex * Switch clang to 16 * link messageqcpp to execplan
This commit is contained in:
@ -1,102 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,6,0,0
|
||||
PRODUCTVERSION 4,6,0,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "InfiniDB, Inc."
|
||||
VALUE "FileDescription", "InfiniDB Primitive Processor"
|
||||
VALUE "FileVersion", "4.6.0-0"
|
||||
VALUE "InternalName", "PrimProc"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014"
|
||||
VALUE "OriginalFilename", "PrimProc.exe"
|
||||
VALUE "ProductName", "InfiniDB"
|
||||
VALUE "ProductVersion", "4.6.0.0 Beta"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
@ -931,7 +931,7 @@ void BatchPrimitiveProcessor::initProcessor()
|
||||
strValues.reset(new utils::NullString[LOGICAL_BLOCK_RIDS]);
|
||||
|
||||
outMsgSize = defaultBufferSize;
|
||||
outputMsg.reset(reinterpret_cast<uint8_t*>(aligned_alloc(utils::MAXCOLUMNWIDTH, outMsgSize)));
|
||||
outputMsg.reset(new(std::align_val_t(MAXCOLUMNWIDTH)) uint8_t[outMsgSize]);
|
||||
|
||||
if (ot == ROW_GROUP)
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ class BatchPrimitiveProcessor
|
||||
/* Common space for primitive data */
|
||||
alignas(utils::MAXCOLUMNWIDTH) uint8_t blockData[BLOCK_SIZE * utils::MAXCOLUMNWIDTH];
|
||||
uint8_t blockDataAux[BLOCK_SIZE * execplan::AUX_COL_WIDTH];
|
||||
boost::scoped_array<uint8_t> outputMsg;
|
||||
std::unique_ptr<uint8_t[], utils::AlignedDeleter> outputMsg;
|
||||
uint32_t outMsgSize;
|
||||
|
||||
std::vector<SCommand> filterSteps;
|
||||
|
@ -631,7 +631,8 @@ void ColumnCommand::fillInPrimitiveMessageHeader(const int8_t outputType, const
|
||||
size_t inputMsgBufSize = baseMsgLength + (LOGICAL_BLOCK_RIDS * sizeof(primitives::RIDType));
|
||||
|
||||
if (!inputMsg)
|
||||
inputMsg.reset(reinterpret_cast<uint8_t*>(aligned_alloc(utils::MAXCOLUMNWIDTH, inputMsgBufSize)));
|
||||
inputMsg.reset(new(std::align_val_t(utils::MAXCOLUMNWIDTH)) uint8_t[inputMsgBufSize]);
|
||||
|
||||
|
||||
primMsg = (NewColRequestHeader*)inputMsg.get();
|
||||
outMsg = (ColResultHeader*)bpp->outputMsg.get();
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "columnwidth.h"
|
||||
#include "command.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
|
||||
@ -164,7 +166,7 @@ class ColumnCommand : public Command
|
||||
|
||||
bool _isScan;
|
||||
|
||||
boost::scoped_array<uint8_t> inputMsg;
|
||||
std::unique_ptr<uint8_t[], utils::AlignedDeleter> inputMsg;
|
||||
NewColRequestHeader* primMsg;
|
||||
ColResultHeader* outMsg;
|
||||
|
||||
|
@ -370,9 +370,9 @@ namespace exemgr
|
||||
// shared by multiple threads per session.
|
||||
ThreadCntPerSessionMap_t threadCntPerSessionMap_;
|
||||
std::mutex threadCntPerSessionMapMutex_;
|
||||
ActiveStatementCounter* statementsRunningCount_;
|
||||
joblist::DistributedEngineComm* dec_;
|
||||
joblist::ResourceManager* rm_;
|
||||
ActiveStatementCounter* statementsRunningCount_ = nullptr;
|
||||
joblist::DistributedEngineComm* dec_ = nullptr;
|
||||
joblist::ResourceManager* rm_ = nullptr;
|
||||
// Its attributes are set in Child()
|
||||
querytele::QueryTeleServerParms teleServerParms_;
|
||||
std::vector<struct in_addr> localNetIfaceSins_;
|
||||
|
@ -248,7 +248,7 @@ void SQLFrontSessionThread::analyzeTableExecute(messageqcpp::ByteStream& bs, job
|
||||
auto rowCount = jl->projectTable(dummyTableOid, bs);
|
||||
while (rowCount)
|
||||
{
|
||||
auto outRG = (static_cast<joblist::TupleJobList*>(jl.get()))->getOutputRowGroup();
|
||||
auto const& outRG = (static_cast<joblist::TupleJobList*>(jl.get()))->getOutputRowGroup();
|
||||
statisticsManager->collectSample(outRG);
|
||||
rowCount = jl->projectTable(dummyTableOid, bs);
|
||||
}
|
||||
@ -894,7 +894,7 @@ void SQLFrontSessionThread::operator()()
|
||||
std::unique_lock<std::mutex> scoped(jlMutex);
|
||||
destructing++;
|
||||
std::thread bgdtor(
|
||||
[jl, &jlMutex, &jlCleanupDone, stmtID, &li, &destructing, &msgLog]
|
||||
[jl, &jlMutex, &jlCleanupDone, stmtID, li, &destructing, &msgLog]
|
||||
{
|
||||
std::unique_lock<std::mutex> scoped(jlMutex);
|
||||
const_cast<joblist::SJLP&>(jl).reset(); // this happens second; does real destruction
|
||||
|
Reference in New Issue
Block a user