ctest crashes with segfault or std::bad_alloc at ctest_update (SVN, cmake >=3.9.x)
ctest fails with Segmentation fault (core dumped) or std::bad_alloc (both can occur) when reaching a ctest_update statement. This behavior is new up from cmake 3.9.x (means, same project and cmake file(s) works on versions <= 3.8.2)
We have tested it on Gentoo Linux with 3.9.6, 3.10.2 and 3.10.3.
Code in our cmake file is:
safe_message("Looking for updates..") ctest_update(RETURN_VALUE count) safe_message("Looked for updates..")
Therefore, ctest gives as output:
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)```
Segmentation fault (core dumped)```
See also gdc and valgrind output (attached).
If you want to try it out: https://github.com/gismo/gismo/