Re: [PATCH] D17248: [Sema] PR26444 fix crash when alignment value is >= 2**16
hintonda added a comment. Great, thanks David. http://reviews.llvm.org/D17248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17248: [Sema] PR26444 fix crash when alignment value is >= 2**16
majnemer closed this revision. majnemer added a comment. I committed this a few days ago in http://reviews.llvm.org/rL262466. Closing this differential. http://reviews.llvm.org/D17248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17248: [Sema] PR26444 fix crash when alignment value is >= 2**16
hintonda added a comment. Thanks David. Btw, could you commit it for me? I don't have commit access. http://reviews.llvm.org/D17248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17248: [Sema] PR26444 fix crash when alignment value is >= 2**16
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D17248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D17248: [Sema] PR26444 fix crash when alignment value is >= 2**16
hintonda updated this revision to Diff 48742. hintonda added a comment. Added comment Added comment to test file. http://reviews.llvm.org/D17248 Files: lib/CodeGen/CGValue.h test/Sema/attr-aligned.c Index: test/Sema/attr-aligned.c === --- test/Sema/attr-aligned.c +++ test/Sema/attr-aligned.c @@ -3,6 +3,9 @@ int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}} int y __attribute__((aligned(1 << 29))); // expected-error {{requested alignment must be 268435456 bytes or smaller}} +// PR26444 +int y __attribute__((aligned(1 << 28))); + // PR3254 short g0[3] __attribute__((aligned)); short g0_chk[__alignof__(g0) == 16 ? 1 : -1]; Index: lib/CodeGen/CGValue.h === --- lib/CodeGen/CGValue.h +++ lib/CodeGen/CGValue.h @@ -445,7 +445,7 @@ // Qualifiers Qualifiers Quals; - unsigned short Alignment; + unsigned Alignment; /// DestructedFlag - This is set to true if some external code is /// responsible for setting up a destructor for the slot. Otherwise Index: test/Sema/attr-aligned.c === --- test/Sema/attr-aligned.c +++ test/Sema/attr-aligned.c @@ -3,6 +3,9 @@ int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}} int y __attribute__((aligned(1 << 29))); // expected-error {{requested alignment must be 268435456 bytes or smaller}} +// PR26444 +int y __attribute__((aligned(1 << 28))); + // PR3254 short g0[3] __attribute__((aligned)); short g0_chk[__alignof__(g0) == 16 ? 1 : -1]; Index: lib/CodeGen/CGValue.h === --- lib/CodeGen/CGValue.h +++ lib/CodeGen/CGValue.h @@ -445,7 +445,7 @@ // Qualifiers Qualifiers Quals; - unsigned short Alignment; + unsigned Alignment; /// DestructedFlag - This is set to true if some external code is /// responsible for setting up a destructor for the slot. Otherwise ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D17248: [Sema] PR26444 fix crash when alignment value is <= 2**16
hintonda created this revision. hintonda added a reviewer: majnemer. hintonda added a subscriber: cfe-commits. Sema allows max values up to 2**28, use unsigned instead of unsiged short to hold values that large. http://reviews.llvm.org/D17248 Files: lib/CodeGen/CGValue.h test/Sema/attr-aligned.c Index: test/Sema/attr-aligned.c === --- test/Sema/attr-aligned.c +++ test/Sema/attr-aligned.c @@ -2,6 +2,7 @@ int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}} int y __attribute__((aligned(1 << 29))); // expected-error {{requested alignment must be 268435456 bytes or smaller}} +int y __attribute__((aligned(1 << 28))); // PR3254 short g0[3] __attribute__((aligned)); Index: lib/CodeGen/CGValue.h === --- lib/CodeGen/CGValue.h +++ lib/CodeGen/CGValue.h @@ -445,7 +445,7 @@ // Qualifiers Qualifiers Quals; - unsigned short Alignment; + unsigned Alignment; /// DestructedFlag - This is set to true if some external code is /// responsible for setting up a destructor for the slot. Otherwise Index: test/Sema/attr-aligned.c === --- test/Sema/attr-aligned.c +++ test/Sema/attr-aligned.c @@ -2,6 +2,7 @@ int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}} int y __attribute__((aligned(1 << 29))); // expected-error {{requested alignment must be 268435456 bytes or smaller}} +int y __attribute__((aligned(1 << 28))); // PR3254 short g0[3] __attribute__((aligned)); Index: lib/CodeGen/CGValue.h === --- lib/CodeGen/CGValue.h +++ lib/CodeGen/CGValue.h @@ -445,7 +445,7 @@ // Qualifiers Qualifiers Quals; - unsigned short Alignment; + unsigned Alignment; /// DestructedFlag - This is set to true if some external code is /// responsible for setting up a destructor for the slot. Otherwise ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits