[llvm] r229530 - Don't deference the section_end() iterator.
Rafael Espindola
rafael.espindola at gmail.com
Tue Feb 17 12:07:28 PST 2015
Author: rafael
Date: Tue Feb 17 14:07:28 2015
New Revision: 229530
URL: http://llvm.org/viewvc/llvm-project?rev=229530&view=rev
Log:
Don't deference the section_end() iterator.
Hard to test given the undefined behavior nature.
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=229530&r1=229529&r2=229530&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Tue Feb 17 14:07:28 2015
@@ -214,6 +214,9 @@ RuntimeDyldImpl::loadObjectImpl(const ob
StubMap Stubs;
section_iterator RelocatedSection = SI->getRelocatedSection();
+ if (RelocatedSection == SE)
+ continue;
+
relocation_iterator I = SI->relocation_begin();
relocation_iterator E = SI->relocation_end();
More information about the llvm-commits
mailing list