Reapply: [MachO] Add a test for detecting reserved unit length.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Tue, 14 Jan 2020 13:05:27 +0000 (20:05 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Tue, 21 Jan 2020 09:59:44 +0000 (16:59 +0700)
commit6b4f86f65f165249cbea1d23611ac97aeec7a082
tree455126df93d3127d6e5727011e153b47a9b0c612
parentff9877ce34b86f8f63a773e0e8e383a7ef2bec95
Reapply: [MachO] Add a test for detecting reserved unit length.

The test in the origin patch did not create a __debug_str section.
An UBSan check triggered when the corresponding pointer was dereferenced.

Differential Revision: https://reviews.llvm.org/D72695

This reapplies fcc08aa835de1e0c1f3e7e479917575e55433b68
which was reverted in b16f82ad3b095070729cde2873bd3a2e8ab35c0e.
lld/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp