This is an archive of the discontinued LLVM Phabricator instance.

Limit Max Vector alignment on COFF targets to 8192
ClosedPublic

Authored by erichkeane on Aug 7 2020, 12:11 PM.

Details

Summary

COFF targets have a max object alignment of 8192, so trying to create
one with a larger size results in an unreachable in WinCOFFObjectWriter.

For the reproducer I have uses thread local storage, however other
alignments are likely affected as well.

This patch sets the MaxVectorAlign for COFF to 8192. Additionally,
though there is no longer a way to reproduce that I could find, it
correctly sets the MaxTLSAlign for COFF to that value as well, so that
if anyone comes up with a situation where this is true, it will cause an
error.

Diff Detail

Event Timeline

erichkeane requested review of this revision.Aug 7 2020, 12:11 PM
erichkeane created this revision.
This revision is now accepted and ready to land.Aug 11 2020, 9:54 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2020, 6:35 AM