[PATCH] D45740: llvm-pdbutil: Fix an off-by-one error.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 14:49:37 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330222: llvm-pdbutil: Fix an off-by-one error. (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45740?vs=142834&id=142839#toc
Repository:
rL LLVM
https://reviews.llvm.org/D45740
Files:
lld/trunk/test/COFF/pdb.test
llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
Index: lld/trunk/test/COFF/pdb.test
===================================================================
--- lld/trunk/test/COFF/pdb.test
+++ lld/trunk/test/COFF/pdb.test
@@ -274,7 +274,7 @@
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.pdata] | mod = 0, 0003:0000, size = 12, data crc = 361370162, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
-RAW-NEXT: SC[???] | mod = 0, 0004:0000, size = {{[0-9]+}}, data crc = 264583633, reloc crc = 0
+RAW-NEXT: SC[.xdata] | mod = 0, 0004:0000, size = {{[0-9]+}}, data crc = 264583633, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
RAW-NOT: SC[
RAW: Section Map
Index: llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
===================================================================
--- llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
+++ llvm/trunk/tools/llvm-pdbutil/DumpOutputStyle.cpp
@@ -491,7 +491,7 @@
ArrayRef<std::string> SectionNames,
uint32_t FieldWidth) {
std::string NameInsert;
- if (SC.ISect > 0 && SC.ISect < SectionNames.size()) {
+ if (SC.ISect > 0 && SC.ISect <= SectionNames.size()) {
StringRef SectionName = SectionNames[SC.ISect - 1];
NameInsert = formatv("[{0}]", SectionName).str();
} else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45740.142839.patch
Type: text/x-patch
Size: 1475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/5b2cfdd1/attachment.bin>
More information about the llvm-commits
mailing list