diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-17 20:07:28 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-17 20:07:28 +0000 |
commit | 127b6c3ba7fef9c0b39dac4c343d14eeba2c53d2 (patch) | |
tree | e5ad0a2c4a5960346fea03bdcd039b991463961c /llvm/lib/ExecutionEngine | |
parent | 9d6eb573d7e760626401008b590a6eaeb1508c18 (diff) | |
download | bcm5719-llvm-127b6c3ba7fef9c0b39dac4c343d14eeba2c53d2.tar.gz bcm5719-llvm-127b6c3ba7fef9c0b39dac4c343d14eeba2c53d2.zip |
Don't deference the section_end() iterator.
Hard to test given the undefined behavior nature.
llvm-svn: 229530
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index fb53ba96055..54f1a1c0cc2 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(); |