]> granicus.if.org Git - clang/commit
Limit COFF 'common' emission to <=32 alignment types.
authorErich Keane <erich.keane@intel.com>
Tue, 8 Jan 2019 18:44:22 +0000 (18:44 +0000)
committerErich Keane <erich.keane@intel.com>
Tue, 8 Jan 2019 18:44:22 +0000 (18:44 +0000)
commit92f4b5cbeee88f31a8df876f73b823db284f68de
tree77c4a7082970d35b334d09ece1bd645a37cc9884
parentbb0807fa5dfc699fa26e4c7d40c42dfe513f0aa0
Limit COFF 'common' emission to <=32 alignment types.

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

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

Change-Id: I48609289753b7f3b58c5e2bc1712756750fbd45a

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350643 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGen/microsoft-no-common-align.c [new file with mode: 0644]