Commit 27f03355 authored by Brad King's avatar Brad King
Browse files

ctest_update: Fix crash when handling svn externals

Refactoring in commit v3.9.0-rc1~156^2 (c++: prefer vectors over lists,
2017-05-04) switched `cmCTestSVN::Repositories` from `std::list` to
`std::vector`.  This can cause re-allocation when svn externals are
processed and break the `RootInfo` pointer that is supposed to point at
the first repository element.  Switch back to `std::list` so that the
address remains stable.

Fixes: #17854
parent 75e8af33
......@@ -8,6 +8,7 @@
#include "cmCTestGlobalVC.h"
#include <iosfwd>
#include <list>
#include <string>
#include <vector>
......@@ -70,7 +71,8 @@ private:
friend struct Revision;
// Info of all the repositories (root, externals and nested ones).
std::vector<SVNInfo> Repositories;
// Use std::list so the elements don't move in memory.
std::list<SVNInfo> Repositories;
// Pointer to the infos of the root repository.
SVNInfo* RootInfo;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment