Green Hills Multi Segmentation Fault since v3.18.0
Hello all. When trying to generate a Multi project, I run into a segmentation fault:
# running cmake
$ gdb --args /opt/cmake-debug/bin/cmake -G"Green Hills MULTI" -Appc -DGHS_TOOLSET_ROOT=$(realpath ~/ghs/) ..
# segfault
Program received signal SIGSEGV, Segmentation fault.
cmGhsMultiTargetGenerator::WriteSources (this=this@entry=0x7fffffffc530, fout_proj=...)
at /home/danielh/git/cmake/Source/cmGhsMultiTargetGenerator.cxx:553
553 bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty(
# source:
551 for (auto& sg : groupFilesList) {
552 std::ostream* fout;
553 bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty(
554 "GHS_NO_SOURCE_GROUP_FILE")) ||
555 cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"))
556 if (useProjectFile || sg.empty()) {
557 fout = &fout_proj;
558 } else {
559 // Open the filestream in copy-if-different mode.
560 std::string gname = sg;
561 cmsys::SystemTools::ReplaceString(gname, "\\", "_");
562 std::string lpath = cmStrCat(
563 this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), '/',
564 gname, cmGlobalGhsMultiGenerator::FILE_EXTENSION);
This is apparently fixed in master
. However, I see that a related MR is marked for 3.19
.
Is it possible to include those fixes in 3.18.1
?
Admittedly, I haven't pinpointed the fixing commits, so if they are actually intended for 3.18.1
, then disregard this issue :)
Best, Danny