[PATCH] D34359: [DWARF] Verification of the validity of the hash data offsets in the .apple_names section.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 15:29:56 PDT 2017


aprantl added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:313
+
+  // Verify that each hash has a valid hashdata offset
+  for (uint32_t HashIdx = 0; HashIdx < NumHashes; ++HashIdx) {
----------------
`.` at the end


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:318
+    if (!AppleNamesSection.isValidOffsetForDataOfSize(HashDataOffset,
+                                                      2 * sizeof(uint32_t))) {
+      OS << format("error: Hash[%d] has invalid HashData offset: 0x%08x\n",
----------------
should we just say 64 here?


================
Comment at: test/tools/llvm-dwarfdump/X86/apple_names_verify_hashdata_offset.s:3
+# RUN: | not llvm-dwarfdump -verify - \
+# RUN: | FileCheck %s
+
----------------
Since the verifier continues on error, could this test be merged with any of the existing .apple_names tests?


https://reviews.llvm.org/D34359





More information about the llvm-commits mailing list