1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

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 7bba893902
commit fdfa1ef6cd

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