diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -26,6 +26,7 @@ #include "llvm/Support/Host.h" #include "llvm/Support/Mutex.h" #include "llvm/Support/SwapByteOrder.h" +#include #include #include #include @@ -251,7 +252,9 @@ // A list of all sections emitted by the dynamic linker. These sections are // referenced in the code by means of their index in this list - SectionID. - typedef SmallVector SectionList; + // Because references may be kept while the list grows, use a container that + // guarantees reference stability. + typedef std::deque SectionList; SectionList Sections; typedef unsigned SID; // Type for SectionIDs