[PATCH] D75110: Avoid dangling reference when indexing sections
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 23:30:06 PST 2020
serge-sans-paille updated this revision to Diff 246632.
serge-sans-paille added a comment.
Fix include order
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75110/new/
https://reviews.llvm.org/D75110
Files:
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
Index: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
===================================================================
--- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ 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 <deque>
#include <map>
#include <system_error>
#include <unordered_map>
@@ -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<SectionEntry, 64> SectionList;
+ // Because references may be kept while the list grows, use a container that
+ // guarantees reference stability.
+ typedef deque<SectionEntry> SectionList;
SectionList Sections;
typedef unsigned SID; // Type for SectionIDs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75110.246632.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200226/668271a9/attachment.bin>
More information about the llvm-commits
mailing list