From 127b6c3ba7fef9c0b39dac4c343d14eeba2c53d2 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. llvm-svn: 229530 --- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index fb53ba9..54f1a1c 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/llvm/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.7.4