[PATCH] D86923: [llvm-readobj/elf] - Don't crash when the size of a dynamic symbol table, inferred from the hash table, is broken.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 02:55:55 PDT 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dyn-symbols-size-from-hash-table.test:340
+
+# BROKEN-NCHAIN-GNU: {{^}}[[#%u,FILESIZE:]]
+# BROKEN-NCHAIN-GNU: warning: '[[FILE]]': the derived from the hash table size (0x17ffffffe8) of the dynamic symbol table at 0x[[#%x,DYNSYMOFF:]] goes past the end of the file (0x[[#%x, FILESIZE]]) and will be ignored
----------------
jhenderson wrote:
> jhenderson wrote:
> > I don't think you need the `{{^}}` here and below, since the FileCheck value will start from the start of the number anyway, and we know it will be at the start of the file.
> Be consistent with your spacing after the `,` in the FileCheck numeric variables. I don't mind which you use, but you've got some cases with a space after it, and others without.
note: there is a solid reason not to use `{{^}}` here:
I've tested on mac that `wc -c` does not start printing from the begining of the line, it adds whitespaces.
So with `{{^}}` it just doesn't pass there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86923/new/

https://reviews.llvm.org/D86923



More information about the llvm-commits mailing list