[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
Tue Dec 13 10:07:20 PST 2022
DiggerLin added a comment.
thanks for adding a new malform empty archive test case.
================
Comment at: llvm/test/Object/archive-big-malformed-first-member.test:2
+# Test reading an empty archive with first member's offset is not zero.
+# RUN: not llvm-ar tv %p/Inputs/aix-malformed-big-archive.a 2>&1 \
+# RUN: | grep 'truncated or malformed archive'
----------------
I think you can generate the malform aix-malformed-big-archive.a with following command in test case ( we do not need llvm/test/Object/Inputs/aix-malformed-big-archive.a)
```
#RUN: echo "<bigaf>" > %t.a
#RUN: echo "0 0 123 0 0 0" >> %t.a
#RUN: %python -c "with open('%t.a', 'r+b') as input: input.truncate(128)"
```
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