[PATCH] D75081: [CodeView] Align type records on 4-bytes when emitting PDBs
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 14:38:35 PST 2020
aganea created this revision.
aganea added reviewers: rnk, zturner.
Herald added subscribers: llvm-commits, rupprecht, hiraditya.
Herald added a reviewer: jhenderson.
Herald added a project: LLVM.
When emitting PDBs, the `TypeStreamMerger` class is used to merge `.debug$T` records from the input .OBJ files into the output .PDB stream.
Records in .OBJs are not required to be aligned on 4-bytes, and "The Netwide Assembler 2.14" generates non-aligned records.
When compiling with `-DLLVM_ENABLE_ASSERTIONS=ON`, an assert was triggered in `MergingTypeTableBuilder` when non-ghash merging was used.
With ghash merging there was no assert.
As a result, LLD could potentially generate a non-aligned TPI stream.
We now align records on 4-bytes when record indices are remapped (in `TypeStreamMerger::remapIndices()`).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75081
Files:
llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
llvm/test/tools/llvm-readobj/COFF/codeview-merging-alignement.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75081.246307.patch
Type: text/x-patch
Size: 4919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/fed60977/attachment.bin>
More information about the llvm-commits
mailing list