Hi, About a week ago I asked for easy to reproduce and potentially easy to fix bugs for my CS students (I'm a CS teacher) to work on. One of the bug reports which I received was this one (which wasn't in BZ yet, so I'm entering it now): | -- CMakeLists.txt -- | include(foo.cmake) | foo() | | -- foo.cmake -- | macro(foo) | message(SEND_ERROR "foo") | endmacro(foo) | | $ cmake CMakeLists.txt | ... | Segmentation fault (core dumped) with Extra's cmake-2.4.3-3.fc5 I did not had time yet to test it with recent cmake version. --- My student has taken a look at this and the problem is that when an error is thrown during execution, rather then during parsing as this code does, then the args vector which should contain the filename and lineno as args[0] is empty. This seems to be normal as the code just above the code causing the crash checks for an empty args vector. This patch fixes this issue by using newLFF.Arguments[0] instead of args[0], as newLFF.Arguments[0] gets filed in a code path which checks that args is not a 0 sized vector and otherwise fills newLFF.Arguments[0] with a filename of "unknown" instead of crashing. Also could you please send this upstream ?
Created attachment 141996 [details] PATCH fixing a crash
This is fixed in cmake 2.4.4.
Any chance on upgrading to 2.4.4 then? I find closed upstream a rather strange resolution instead I would expect you to update the FE packages and close this as nextrelease.
2.4.4 was built for all releases yesterday. I chose upstream because that's where the bug was fixed, but maybe that wasn't the right choice. I've closed current release with 2.4.4-1.
Yes, much better, thanks. upstream is usually used for not a packaging problem and cannot / willnot fix it in Fedora because it requires someone really intimate with the code so let upstream figure it out.