From 38c028b3616c84b09d623953cf6d0211d4fe85a2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 17 Feb 2015 20:07:28 +0000 Subject: [PATCH] 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 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.34.1