This is an archive of the discontinued LLVM Phabricator instance.

Limit COFF 'common' emission to <=32 alignment types.
ClosedPublic

Authored by erichkeane on Jan 7 2019, 7:44 AM.

Details

Summary

As reported in PR33035, LLVM crashes if given a common object with an
alignment of greater than 32 bits. This is because the COFF file format
does not support these alignments, so emitting them is broken anyway.

This patch changes any global definitions greater than 32 bit alignment
to no longer be in 'common'.

https://bugs.llvm.org/show_bug.cgi?id=33035

Diff Detail

Event Timeline

erichkeane created this revision.Jan 7 2019, 7:44 AM
majnemer added inline comments.Jan 7 2019, 12:41 PM
lib/CodeGen/CodeGenModule.cpp
3766

I think this should be isKnownWindowsMSVCEnvironment

erichkeane updated this revision to Diff 180650.Jan 8 2019, 6:16 AM
erichkeane marked an inline comment as done.
pengfei accepted this revision.Jan 8 2019, 6:19 AM

LGTM, thanks Erich.

This revision is now accepted and ready to land.Jan 8 2019, 6:19 AM
This revision was automatically updated to reflect the committed changes.