[llvm] [llvm-readobj] Support --string-table for COFF (PR #141552)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 02:53:35 PDT 2025
================
@@ -0,0 +1,60 @@
+# RUN: yaml2obj %s -o %t.obj
----------------
jh7370 wrote:
> StringTableSize has been set to at least 4 and there's assertion to make sure stringtable end must be '\0'.
That might well be what the code currently does, but the test needs to show that it does this. Otherwise, somebody might change how the code works and accidentally break existing behaviour, because it is untested. For example, somebody might decide the printing function should read the data directly, rather than rely on the existing library methods, but then forget to add these sort of conditions.
Anyway, that code looks suspect: what happens if the file ends fewer than 4 bytes after the end of the string table?
https://github.com/llvm/llvm-project/pull/141552
More information about the llvm-commits
mailing list