You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Test malformed global symbal table of big archive.
2
+
3
+
# RUN: rm -rf %t && mkdir %t && cd %t
4
+
# RUN: yaml2obj %s -o t.o
5
+
# RUN: llvm-ar q t.a t.o
6
+
# RUN: cp t.a t2.a
7
+
8
+
## Truncate the file to end before the global symbol table header ends.
9
+
# RUN: %python -c "with open('t.a', 'r+b') as input: input.truncate(560)"
10
+
## Truncate the file to end before the global symbol table ends.
11
+
# RUN: %python -c "with open('t2.a', 'r+b') as input: input.truncate(656)"
12
+
13
+
# RUN: not llvm-ar t t.a 2>&1 | FileCheck -DFILE=t.a %s
14
+
# RUN: not llvm-ar t t2.a 2>&1 | FileCheck -DFILE=t2.a --check-prefixes=CHECK2 %s
15
+
16
+
# CHECK: error: unable to load '[[FILE]]': truncated or malformed archive (global symbol table header at offset 0x20e and size 0x72 goes past the end of file)
17
+
# CHECK2: error: unable to load '[[FILE]]': truncated or malformed archive (global symbol table content at offset 0x280 and size 0x25 goes past the end of file)
0 commit comments