[PATCH] D138986: [AIX][BigArchive] Treat the archive is empty if the first child member offset is zero
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 06:23:17 PST 2022
DiggerLin added inline comments.
================
Comment at: llvm/include/llvm/Object/Archive.h:416
uint64_t getLastChildOffset() const { return LastChildOffset; }
- bool isEmpty() const override {
- return Data.getBufferSize() == sizeof(FixLenHdr);
- };
+ bool isEmpty() const override { getFirstChildOffset() == 0; };
};
----------------
Esme wrote:
>
if we have big archive file which only has archive Fixed-Length Header and the fl_fstmoff[20] is not zero. I am not sure that the program is crash or print malform at this situation(the program should not crash) ? if (Data.getBufferSize() == sizeof(FixLenHdr) || getFirstChildOffset() == 0) , I am sure that it not crash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138986/new/
https://reviews.llvm.org/D138986
More information about the llvm-commits
mailing list