From: Rafael Espindola Date: Tue, 17 Feb 2015 20:07:28 +0000 (+0000) Subject: Don't deference the section_end() iterator. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=38c028b3616c84b09d623953cf6d0211d4fe85a2;p=oota-llvm.git Don't deference the section_end() iterator. Hard to test given the undefined behavior nature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229530 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index fb53ba96055..54f1a1c0cc2 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -214,6 +214,9 @@ RuntimeDyldImpl::loadObjectImpl(const object::ObjectFile &Obj) { StubMap Stubs; section_iterator RelocatedSection = SI->getRelocatedSection(); + if (RelocatedSection == SE) + continue; + relocation_iterator I = SI->relocation_begin(); relocation_iterator E = SI->relocation_end();