Bug 97447

Summary: sizeof(CSSRule) compile assertion failure
Product: WebKit Reporter: Jonathan Liu <net147>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Blocker CC: cmarcelo, darin, fpizlo, hausmann, macpherson, menard, rniwa, webkit.review.bot
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch. none

Description Jonathan Liu 2012-09-24 05:39:06 PDT
COMPILE_ASSERT(sizeof(CSSRule) == sizeof(SameSizeAsCSSRule), CSSRule_should_stay_small) fails when building with MinGW-w64 GCC 4.7.2. It previously compiled successfully with MinGW-w64 GCC 4.6.3.

The problem seems to be a change in the default behavior when padding bitfields. MinGW GCC 4.7.x uses -mms-bitfields by default while MinGW GCC 4.6.x doesn't. Since the underlying type is unsigned, it pads to 32-bit when it should really be padding to 8-bit.
Comment 1 Jonathan Liu 2012-09-24 05:43:45 PDT
Created attachment 165359 [details]
Patch.
Comment 2 WebKit Review Bot 2012-09-24 07:39:58 PDT
Comment on attachment 165359 [details]
Patch.

Clearing flags on attachment: 165359

Committed r129365: <http://trac.webkit.org/changeset/129365>
Comment 3 WebKit Review Bot 2012-09-24 07:40:01 PDT
All reviewed patches have been landed.  Closing bug.