[llvm] r340125 - [RuntimeDyld] Fix a bug in RuntimeDyld::loadObjectImpl that was over-allocating
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 18 11:38:37 PDT 2018
Author: lhames
Date: Sat Aug 18 11:38:37 2018
New Revision: 340125
URL: http://llvm.org/viewvc/llvm-project?rev=340125&view=rev
Log:
[RuntimeDyld] Fix a bug in RuntimeDyld::loadObjectImpl that was over-allocating
space for common symbols.
Patch by Dmitry Sidorov. Thanks Dmitry!
Differential revision: https://reviews.llvm.org/D50240
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=340125&r1=340124&r2=340125&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Sat Aug 18 11:38:37 2018
@@ -277,7 +277,7 @@ RuntimeDyldImpl::loadObjectImpl(const ob
uint64_t Size = I->getCommonSize();
if (!CommonAlign)
CommonAlign = Align;
- CommonSize += alignTo(CommonSize, Align) + Size;
+ CommonSize = alignTo(CommonSize, Align) + Size;
CommonSymbolsToAllocate.push_back(*I);
}
} else
More information about the llvm-commits
mailing list