.debug_names: Correctly align the AugmentationStringSize field
authorPavel Labath <labath@google.com>
Thu, 29 Mar 2018 15:12:45 +0000 (15:12 +0000)
committerPavel Labath <labath@google.com>
Thu, 29 Mar 2018 15:12:45 +0000 (15:12 +0000)
commitea0f841c3b4063ec5e8edc2d5976a9f803efec6c
treec7d8b5d8f787dcb8b457f03d61d19c35b6dd54a5
parentb2f2bb26e443d21d57cc1b5ebcfdd86b33417e4d
.debug_names: Correctly align the AugmentationStringSize field

We should align the value of the field, not the overall section offset.

This distinction matters if one of the debug_names contributions is not
of size which is a multiple of four. The dwarf producers may choose to
emit rounded contributions, but they are not required to do so. In the
latter case, without this patch we would corrupt the parsing state, as
we would adjust the offset even if subsequent contributions contained
correctly rounded augmentation strings.

llvm-svn: 328796
llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug-names-misaligned.s [new file with mode: 0644]