summaryrefslogtreecommitdiff
path: root/tools/lli/RemoteMemoryManager.h
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-10-04 20:09:36 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-10-04 20:09:36 +0000
commite3fd646e178f92dbe2737a5230d73577090d9d0e (patch)
treeeab222ddc60bc651b47b9ce037b56afdbe5362a9 /tools/lli/RemoteMemoryManager.h
parente7099f6ff48ee99e50aa8347b455255e3a893a12 (diff)
downloadllvm-e3fd646e178f92dbe2737a5230d73577090d9d0e.tar.gz
llvm-e3fd646e178f92dbe2737a5230d73577090d9d0e.tar.bz2
llvm-e3fd646e178f92dbe2737a5230d73577090d9d0e.tar.xz
Fixing container/pointer bug in remote-lli found by ASan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli/RemoteMemoryManager.h')
-rw-r--r--tools/lli/RemoteMemoryManager.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lli/RemoteMemoryManager.h b/tools/lli/RemoteMemoryManager.h
index dc74666672..ca157a7929 100644
--- a/tools/lli/RemoteMemoryManager.h
+++ b/tools/lli/RemoteMemoryManager.h
@@ -30,6 +30,7 @@ class RemoteMemoryManager : public JITMemoryManager {
public:
// Notice that this structure takes ownership of the memory allocated.
struct Allocation {
+ Allocation() {}
Allocation(sys::MemoryBlock mb, unsigned a, bool code)
: MB(mb), Alignment(a), IsCode(code) {}
@@ -48,11 +49,11 @@ private:
// have allocated locally but have not yet remapped for the remote target.
// When we receive notification of a completed module load, we will map
// these sections into the remote target.
- SmallVector<const Allocation *, 2> UnmappedSections;
+ SmallVector<Allocation, 2> UnmappedSections;
// This map tracks the sections we have remapped for the remote target
// but have not yet copied to the target.
- DenseMap<uint64_t, const Allocation *> MappedSections;
+ DenseMap<uint64_t, Allocation> MappedSections;
// FIXME: This is part of a work around to keep sections near one another
// when MCJIT performs relocations after code emission but before