[PATCH] D105522: [llvm-readobj][XCOFF] Fix the error dumping for the first item of StringTable.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 04:11:02 PDT 2021
jhenderson added inline comments.
================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:193
+ return StringRef(StringTable.Data,
+ StringTable.Size > 4 ? StringTable.Size : 0);
}
----------------
Looks like you may need a test case for a single-byte sized table!
Also, I think you need the following two test cases:
1) Empty string table with just the length field.
2) String table which is too short for the length field.
The latter assumes there's a yaml2obj implementation that supports custom string table data. If it doesn't exist, consider adding it, but it's not essential if there isn't.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105522/new/
https://reviews.llvm.org/D105522
More information about the llvm-commits
mailing list