[PATCH] D67002: [llvm-nm] - Add a test case for case when we dump a symbol that belongs to a section with a broken sh_name.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 07:06:12 PDT 2019


jhenderson added inline comments.


================
Comment at: test/tools/llvm-nm/format-sysv-section.test:38
+## Here we have a symbol that belongs to a section with a broken name
+## (st_name offset goes past the end of the sections name string table).
+## We test that still can print a reasonable output and don't crash/assert.
----------------
st_name -> sh_name


================
Comment at: test/tools/llvm-nm/format-sysv-section.test:39
+## (st_name offset goes past the end of the sections name string table).
+## We test that still can print a reasonable output and don't crash/assert.
+
----------------
"We that we can still print..."


================
Comment at: test/tools/llvm-nm/format-sysv-section.test:42
+# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: llvm-nm %t2.o --format=sysv | FileCheck %s --check-prefix=ERR
+
----------------
Do we get any warning message here? If we do, I think we should check it. If we don't, I feel like we should.


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

https://reviews.llvm.org/D67002





More information about the llvm-commits mailing list