RuntimeDyld: workaround use-after-free bug (Sections)

Sections is SmallVector, and it grows sometimes, causing use-after-free bug somewhere.
This commit is contained in:
Nekotekina
2020-02-01 17:21:47 +03:00
parent 2e038bff10
commit 9fb67ecaea

View File

@@ -29,6 +29,7 @@
#include <map>
#include <system_error>
#include <unordered_map>
#include <deque>
using namespace llvm;
using namespace llvm::object;
@@ -251,7 +252,7 @@ protected:
// 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<SectionEntry, 64> SectionList;
typedef std::deque<SectionEntry> SectionList;
SectionList Sections;
typedef unsigned SID; // Type for SectionIDs