[PATCH] D118174: [Symbolize][DebugInfoD] Try looking up failed paths as Build IDs.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 12:23:17 PST 2022


mysterymath added inline comments.


================
Comment at: llvm/lib/DebugInfo/Symbolize/Symbolize.cpp:522
+          reinterpret_cast<const uint8_t *>(Bytes.data()), Bytes.size());
+      if (BuildID.size() != 20)
+        return BinOrErr.takeError();
----------------
phosek wrote:
> Build ID doesn't have any prescribed length, and linkers typically support a number of hashing algorithms (see https://github.com/llvm/llvm-project/blob/3704abaa166bec865f56f48337a1732eab77dc68/lld/ELF/Driver.cpp#L764) so this isn't going to work.
>From the link, it looks like the smallest presently supported would be MD5 and UUID, both at 128 bits.
Given that Build IDs are intended to be globally unique (right?), that seems like a reasonable minimum for this check.

It should be fairly unlikely to have a filename of >= 16 characters that is a valid hex identifier unless it's some kind of ID; we'd be into
aBadBeefCafeBabe territory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118174



More information about the llvm-commits mailing list