From: Fangrui Song Date: Sat, 20 Apr 2019 13:00:09 +0000 (+0000) Subject: [llvm-symbolizer] Fix section index at the end of a section X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6744317c98a5dae0af64c0070703bdf2f8acf65;p=llvm [llvm-symbolizer] Fix section index at the end of a section This is very minor issue. The returned section index is only used by DWARFDebugLine as an llvm::upper_bound input and the use case shouldn't cause any behavioral change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358814 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp index e6e0de05f5d..5d453def7b4 100644 --- a/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp +++ b/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp @@ -313,9 +313,8 @@ uint64_t SymbolizableObjectFile::getModuleSectionIndexForAddress( continue; if (Address >= Sec.getAddress() && - Address <= Sec.getAddress() + Sec.getSize()) { + Address < Sec.getAddress() + Sec.getSize()) return Sec.getIndex(); - } } return object::SectionedAddress::UndefSection;