[PATCH] D87261: [obj2yaml] Stop parsing the debug_str section when it encounters a string without the null terminator.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 00:24:46 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml:325
+
+## d) Test generating and dumping a __debug_str section who contains a string without the null terminator.
+
----------------



================
Comment at: llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml:327
+
+# RUN: yaml2obj --docnum=3 %s | obj2yaml | FileCheck %s --check-prefix=NO-TERMINATOR
+
----------------
Might be worth an `--implicit-check-not` to show that a `DWARF` tag is not included (or a `NO-TERMINATOR-NOT: DWARF` before the `Sections` block).


================
Comment at: llvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml:103
+
+## d) Test that yaml2obj stops parsing the .debug_str section if it encounters a string without a null terminator.
+
----------------
May be worth extending this comment saying that it uses raw content instead of the DWARF tag in this situation. Also, see comment above re. checking there is no DWARF tag in the YAML output.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87261



More information about the llvm-commits mailing list