emaste created this revision. emaste added a reviewer: lldb-commits. There's a proposed patch D18091 adding build-id support to lld that would produce a 64-bit ID. There's some concern as existing tools typically expect the build-id to be either 16 or 20 bytes.
Prior to this change lldb would reject such a build-id, but that doesn't make sense given that lldb will fall back to a 4-byte crc32, a poorer quality identifier. Now we accept the build-id if it is 4 bytes or more. http://reviews.llvm.org/D18096 Files: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1411,7 +1411,7 @@ if (!uuid.IsValid()) { // 16 bytes is UUID|MD5, 20 bytes is SHA1 - if ((note.n_descsz == 16 || note.n_descsz == 20)) + if (note.n_descsz >= 4 && note.n_descsz <= 20) { uint8_t uuidbuf[20]; if (data.GetU8 (&offset, &uuidbuf, note.n_descsz) == nullptr)
Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1411,7 +1411,7 @@ if (!uuid.IsValid()) { // 16 bytes is UUID|MD5, 20 bytes is SHA1 - if ((note.n_descsz == 16 || note.n_descsz == 20)) + if (note.n_descsz >= 4 && note.n_descsz <= 20) { uint8_t uuidbuf[20]; if (data.GetU8 (&offset, &uuidbuf, note.n_descsz) == nullptr)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits