1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

libc++ crashes fixes

This commit is contained in:
Leonid Fedorov
2025-08-01 03:33:40 +00:00
parent 7b660fa860
commit aa87d7fbb3
5 changed files with 55 additions and 52 deletions

View File

@@ -21,7 +21,7 @@ local get_build_command(command) = "bash /mdb/" + builddir + "/storage/columnsto
local clang(version) = [get_build_command("install_clang_deb.sh " + version), local clang(version) = [get_build_command("install_clang_deb.sh " + version),
get_build_command("update-clang-version.sh " + version + " 100"), get_build_command("update-clang-version.sh " + version + " 100"),
get_build_command("install_libc++.sh " + version), get_build_command("install_libc++.sh" + version),
"export CC=/usr/bin/clang", "export CC=/usr/bin/clang",
"export CXX=/usr/bin/clang++" "export CXX=/usr/bin/clang++"
]; ];
@@ -38,7 +38,7 @@ local customEnvCommands(envkey, builddir) =
local customBootstrapParamsForExisitingPipelines(envkey) = local customBootstrapParamsForExisitingPipelines(envkey) =
# errorprone if we pass --custom-cmake-flags twice, the last one will win # errorprone if we pass --custom-cmake-flags twice, the last one will win
local customBootstrapMap = { local customBootstrapMap = {
"ubuntu:24.04": "--custom-cmake-flags '-DCOLUMNSTORE_ASAN_FOR_UNITTESTS=YES'", #"ubuntu:24.04": "--custom-cmake-flags '-DCOLUMNSTORE_ASAN_FOR_UNITTESTS=YES'",
}; };
(if (std.objectHas(customBootstrapMap, envkey)) (if (std.objectHas(customBootstrapMap, envkey))
then customBootstrapMap[envkey] else ""); then customBootstrapMap[envkey] else "");
@@ -635,29 +635,30 @@ local Pipeline(branch, platform, event, arch="amd64", server="10.6-enterprise",
}; };
local AllPipelines = [ local AllPipelines =
Pipeline(b, p, e, a, s) // [
for b in std.objectFields(platforms) // Pipeline(b, p, e, a, s)
for p in platforms[b] // for b in std.objectFields(platforms)
for s in servers[b] // for p in platforms[b]
for e in events // for s in servers[b]
for a in archs // for e in events
] + // for a in archs
[ // ] +
Pipeline(any_branch, p, "custom", a, server) // [
for p in platforms[current_branch] // Pipeline(any_branch, p, "custom", a, server)
for server in servers[current_branch] // for p in platforms[current_branch]
for a in archs // for server in servers[current_branch]
] + // for a in archs
[ // ] +
Pipeline(b, platform, triggeringEvent, a, server, "", buildenv) // [
for a in ["amd64"] // Pipeline(b, platform, triggeringEvent, a, server, "", buildenv)
for b in std.objectFields(platforms) // for a in ["amd64"]
for platform in ["ubuntu:24.04"] // for b in std.objectFields(platforms)
for buildenv in std.objectFields(customEnvCommandsMap) // for platform in ["ubuntu:24.04"]
for triggeringEvent in events // for buildenv in std.objectFields(customEnvCommandsMap)
for server in servers[current_branch] // for triggeringEvent in events
] + // for server in servers[current_branch]
// ] +
// last argument is to ignore mtr and regression failures // last argument is to ignore mtr and regression failures
[ [
Pipeline(b, platform, triggeringEvent, a, server, flag, envcommand, ["regression", "mtr"]) Pipeline(b, platform, triggeringEvent, a, server, flag, envcommand, ["regression", "mtr"])
@@ -668,26 +669,26 @@ local AllPipelines = [
for envcommand in ["clang-20"] for envcommand in ["clang-20"]
for triggeringEvent in events for triggeringEvent in events
for server in servers[current_branch] for server in servers[current_branch]
] +
// last argument is to ignore mtr and regression failures
[
Pipeline(b, platform, triggeringEvent, a, server, flag, "", ["regression", "mtr"])
for a in ["amd64"]
for b in std.objectFields(platforms)
for platform in ["ubuntu:24.04"]
for flag in ["ASan", "UBSan"]
for triggeringEvent in events
for server in servers[current_branch]
] +
[
Pipeline(b, platform, triggeringEvent, a, server, flag, "")
for a in ["amd64"]
for b in std.objectFields(platforms)
for platform in ["rockylinux:8"]
for flag in ["gcc-toolset"]
for triggeringEvent in events
for server in servers[current_branch]
]; ];
// // last argument is to ignore mtr and regression failures
// [
// Pipeline(b, platform, triggeringEvent, a, server, flag, "", ["regression", "mtr"])
// for a in ["amd64"]
// for b in std.objectFields(platforms)
// for platform in ["ubuntu:24.04"]
// for flag in ["ASan", "UBSan"]
// for triggeringEvent in events
// for server in servers[current_branch]
// ] +
// [
// Pipeline(b, platform, triggeringEvent, a, server, flag, "")
// for a in ["amd64"]
// for b in std.objectFields(platforms)
// for platform in ["rockylinux:8"]
// for flag in ["gcc-toolset"]
// for triggeringEvent in events
// for server in servers[current_branch]
// ];
local FinalPipeline(branch, event) = { local FinalPipeline(branch, event) = {
kind: "pipeline", kind: "pipeline",

View File

@@ -24,7 +24,7 @@
namespace execplan namespace execplan
{ {
#define debug_rewrites false #define debug_rewrites true
execplan::OpType oppositeOperator(execplan::OpType op); execplan::OpType oppositeOperator(execplan::OpType op);
@@ -34,7 +34,7 @@ struct NodeSemanticComparator
}; };
// Walk the tree and find out common conjuctions // Walk the tree and find out common conjuctions
template<bool stableSort = false> template <bool stableSort = false>
execplan::ParseTree* extractCommonLeafConjunctionsToRoot(execplan::ParseTree* tree); execplan::ParseTree* extractCommonLeafConjunctionsToRoot(execplan::ParseTree* tree);
bool checkFiltersLimit(execplan::ParseTree* tree, uint64_t limit); bool checkFiltersLimit(execplan::ParseTree* tree, uint64_t limit);
} // namespace execplan } // namespace execplan

View File

@@ -6103,7 +6103,7 @@ int processWhere(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, const s
string rewriteEnabled = cf->getConfig("Rewrites", "CommonLeafConjunctionsToTop"); string rewriteEnabled = cf->getConfig("Rewrites", "CommonLeafConjunctionsToTop");
if (filters && rewriteEnabled != "OFF") if (filters && rewriteEnabled != "OFF")
{ {
filters = extractCommonLeafConjunctionsToRoot(filters); filters = extractCommonLeafConjunctionsToRoot<true>(filters);
} }
uint64_t limit = get_max_allowed_in_values(gwi.thd); uint64_t limit = get_max_allowed_in_values(gwi.thd);
@@ -6306,7 +6306,8 @@ void extractColumnStatistics(Item_field* ifp, gp_walk_info& gwi)
auto* histogram = dynamic_cast<Histogram_json_hb*>(ifp->field->read_stats->histogram); auto* histogram = dynamic_cast<Histogram_json_hb*>(ifp->field->read_stats->histogram);
if (histogram) if (histogram)
{ {
SchemaAndTableName tableName = {ifp->field->table->s->db.str, ifp->field->table->s->table_name.str}; SchemaAndTableName tableName = {ifp->field->table->s->db.str,
ifp->field->table->s->table_name.str};
gwi.tableStatisticsMap[tableName][ifp->field->field_name.str] = *histogram; gwi.tableStatisticsMap[tableName][ifp->field->field_name.str] = *histogram;
} }
} }

View File

@@ -40,7 +40,7 @@ bool treeEqual(execplan::ParseTree* fst, execplan::ParseTree* snd, int depth = 0
(treeEqual(fst->left(), snd->right(), depth + 1) && treeEqual(fst->right(), snd->left(), depth + 1)); (treeEqual(fst->left(), snd->right(), depth + 1) && treeEqual(fst->right(), snd->left(), depth + 1));
} }
#define REWRITE_TREE_TEST_DEBUG false #define REWRITE_TREE_TEST_DEBUG true
void printTree([[maybe_unused]] const std::string& queryName, [[maybe_unused]] execplan::ParseTree* tree, void printTree([[maybe_unused]] const std::string& queryName, [[maybe_unused]] execplan::ParseTree* tree,
[[maybe_unused]] const std::string& treeName) [[maybe_unused]] const std::string& treeName)

View File

@@ -256,10 +256,11 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
Cmds.push_back(0); // null terminate Cmds.push_back(0); // null terminate
// updatePrgmPath(Cmds); // updatePrgmPath(Cmds);
// NOTE: for debugging // // NOTE: for debugging
int aSize = Cmds.size(); int aSize = Cmds.size();
for (int aIdx = 0; aIdx < aSize; ++aIdx) // Do not address last terminating 0
for (int aIdx = 0; aIdx < aSize - 1; ++aIdx)
{ {
cout << "Args " << Cmds[aIdx] << endl; cout << "Args " << Cmds[aIdx] << endl;
} }