Notes |
|
(0040787)
|
Gianfranco
|
2016-04-01 05:57
|
|
cmTarget::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cmMakefile*) const ()
cmGetTargetPropertyCommand::InitialPass(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, cmExecutionStatus&) ()
cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
cmForEachFunctionBlocker::IsFunctionBlocked(cmListFileFunction const&, cmMakefile&, cmExecutionStatus&) ()
cmMakefile::IsFunctionBlocked(cmListFileFunction const&, cmExecutionStatus&) ()
Title: cmake crashed with SIGSEGV in cmTarget::GetProperty() |
|
|
(0040788)
|
Matteo Settenvini
|
2016-04-01 08:31
|
|
Hallo, I am the original reporter. Attached is a patch fixing the problem for me. It includes a test case. |
|
|
(0040790)
|
Brad King
|
2016-04-01 09:44
|
|
|
|
(0040792)
|
Matteo Settenvini
|
2016-04-01 10:01
|
|
Thanks Brad, that was quick!
I am afraid though that it is still not enough. I am having another segfault with your commit at the end of the configuration process, that I do not have with mine.
It is due to the implementation of:
cmLocalGenerator::FindGeneratorTarget(const std::string& name) const
On return, it does not check if an alias is really present before dereferencing the iterator.
You can take a fix directly from my patch, which saves some lines of code too :-).
Cheers! |
|
|
(0040794)
|
Brad King
|
2016-04-01 10:08
|
|
Re 0016044:0040792: Thanks for testing it. Can you provide a test case for that crash too? |
|
|
(0040795)
|
Matteo Settenvini
|
2016-04-01 10:23
|
|
Not yet, although not for wont of trying. We have a big project with ~7'000 cmake code lines, which definitely triggers this, but I've been unable to boil it down to a simple use case.
However, it does definitely breaks all our builds, so we're already patching CMake on our side. The fix should be relatively harmless, though, as one can see that FindGeneratorTarget potentially dereferences an invalid iterator.
I'll try to come up with something, but it was escalated to a low priority task on my side, so it might take some time. |
|
|
(0040796)
|
Brad King
|
2016-04-01 10:41
|
|
|
|
(0040800)
|
Brad King
|
2016-04-01 15:46
|
|
|
|
(0040801)
|
Matteo Settenvini
|
2016-04-04 03:19
|
|
Thanks again Brad, the last commits you posted fix the problem for me. |
|
|
(0041203)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|