[llvm] [llvm-objdump][ELF] Ensure offset to verdaux entry array does not go past size (PR #115284)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 04:58:02 PST 2024


================
@@ -0,0 +1,29 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objdump -p %t 2>&1 | FileCheck --check-prefix=BROKEN-VERDEF -DFILE=%t %s
+
+# BROKEN-VERDEF: Version definitions:
+# BROKEN-VERDEF-NEXT: warning: '[[FILE]]': out-of-bound while parsing verdaux entries, corrupted verdef section
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_DYN
+  Machine:         EM_X86_64
+  Entry:           0x0000000000001000
----------------
jh7370 wrote:

The `Entry` field is unnecessary, and I suspect the `Machine` field is also probably unnecessary for this test, so I'd drop them.

https://github.com/llvm/llvm-project/pull/115284


More information about the llvm-commits mailing list