[llvm] [llvm-readobj] Support --symbol-table for COFF (PR #141552)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 00:03:23 PDT 2025


================
@@ -0,0 +1,60 @@
+# RUN: yaml2obj %s -o %t.obj
----------------
jh7370 wrote:

This test doesn't cover the following significant cases:
1) Empty string tables (i.e. value 0 in the length field).
2) Malformed string tables with too small size (i.e. size less than 4)
3) Malformed string tables with length pointing past the end of the file.

Please add these, as they help ensure a robust llvm-readobj that doesn't crash when it gets something unexpected (or worse, start reading memory outside what it should). The malformed cases might require improvements to yaml2obj to allow you to create a string table with arbitrary values in the length field. This should be a separate PR.

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


More information about the llvm-commits mailing list