[cfe-commits] r113154 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/ivars.m
Fariborz Jahanian
fjahanian at apple.com
Tue Sep 7 09:37:02 PDT 2010
On Sep 6, 2010, at 5:00 AM, Argyrios Kyrtzidis wrote:
> Author: akirtzidis
> Date: Mon Sep 6 07:00:10 2010
> New Revision: 113154
>
> URL: http://llvm.org/viewvc/llvm-project?rev=113154&view=rev
> Log:
> LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps
> bitfields or unnamed fields but later the code
> assumes that it's always a bitfield. This can lead to a crash
> (reported at rdar://8368320).
>
> Modified:
> cfe/trunk/lib/CodeGen/CGObjCMac.cpp
> cfe/trunk/test/CodeGenObjC/ivars.m
>
> Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=113154&r1=113153&r2=113154&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon Sep 6 07:00:10 2010
> @@ -3586,10 +3586,10 @@
> uint64_t MaxSkippedUnionIvarSize = 0;
> FieldDecl *MaxField = 0;
> FieldDecl *MaxSkippedField = 0;
> - FieldDecl *LastFieldBitfield = 0;
> + FieldDecl *LastFieldBitfieldOrUnnamed = 0;
> uint64_t MaxFieldOffset = 0;
> uint64_t MaxSkippedFieldOffset = 0;
> - uint64_t LastBitfieldOffset = 0;
> + uint64_t LastBitfieldOrUnnamedOffset = 0;
>
> if (RecFields.empty())
> return;
> @@ -3609,12 +3609,12 @@
>
> // Skip over unnamed or bitfields
> if (!Field->getIdentifier() || Field->isBitField()) {
OK. We were keeping track of unnamed fields here but forgot about them
at the end.
Fariborz.
>
More information about the cfe-commits
mailing list