<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>222480</bug_id>
          
          <creation_ts>2021-02-26 09:44:03 -0800</creation_ts>
          <short_desc>[GTK] Fails to build in i386: static assertion failed: divisor must be a power of two</short_desc>
          <delta_ts>2021-03-01 01:44:08 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Kimmo Kinnunen">kkinnunen</assigned_to>
          <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>peng.liu6</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1733819</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-02-26 09:44:03 -0800</bug_when>
    <thetext>I can reproduce this with WebKitGTK 2.31.90:

In file included from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:26,
                 from ../Source/WebKit/config.h:42,
                 from DerivedSources/WebKit/WebPageProxyMessageReceiver.cpp:25:
DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h: In instantiation of ‘constexpr size_t WTF::roundUpToMultipleOf(size_t) [with unsigned int divisor = 48; size_t = unsigned int]’:
../Source/WebKit/Platform/IPC/StreamConnectionBuffer.h:117:96:   required from here
DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:187:27: error: static assertion failed: divisor must be a power of two!
  187 |     static_assert(divisor &amp;&amp; !(divisor &amp; (divisor - 1)), &quot;divisor must be a power of two!&quot;);
      |                   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As you can see &apos;divisor&apos; is 48, I suspect that the problem is in sizeof(Header) due to the differences in size_t between 32-bit and 64-bit platforms:

https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/Platform/IPC/StreamConnectionBuffer.h?rev=273204#L117</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733820</commentid>
    <comment_count>1</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-02-26 09:45:05 -0800</bug_when>
    <thetext>This was added in r273204.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733847</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-02-26 10:12:21 -0800</bug_when>
    <thetext>Thanks! It&apos;s a typo:
- roundUpToMultipleOf&lt;sizeof(std::max_align_t)&gt;
+ roundUpToMultipleOf&lt;alignof(std::max_align_t)&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733849</commentid>
    <comment_count>3</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-02-26 10:13:27 -0800</bug_when>
    <thetext>I can fix it on coming Monday the latest, if nobody gets around fixing it before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1733942</commentid>
    <comment_count>4</comment_count>
      <attachid>421699</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-02-26 12:44:11 -0800</bug_when>
    <thetext>Created attachment 421699
Patch

Here is the patch, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1734345</commentid>
    <comment_count>5</comment_count>
      <attachid>421699</attachid>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-03-01 00:59:51 -0800</bug_when>
    <thetext>Comment on attachment 421699
Patch

Thanks, looks good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1734349</commentid>
    <comment_count>6</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-03-01 01:44:08 -0800</bug_when>
    <thetext>Committed r273643: &lt;https://commits.webkit.org/r273643&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>421699</attachid>
            <date>2021-02-26 12:44:11 -0800</date>
            <delta_ts>2021-03-01 01:36:01 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>patch-222480.diff</filename>
            <type>text/plain</type>
            <size>1433</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9DaGFu
Z2VMb2cKaW5kZXggZTdmZWVkMjkxNjQ3Li43MDhkNWRiYWJlMmYgMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMg
KzEsMTMgQEAKKzIwMjEtMDItMjYgIEFsYmVydG8gR2FyY2lhICA8YmVydG9AaWdhbGlhLmNvbT4K
KworICAgICAgICBbR1RLXSBGYWlscyB0byBidWlsZCBpbiBpMzg2OiBzdGF0aWMgYXNzZXJ0aW9u
IGZhaWxlZDogZGl2aXNvciBtdXN0IGJlIGEgcG93ZXIgb2YgdHdvCisgICAgICAgIGh0dHBzOi8v
YnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yMjI0ODAKKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMh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Om1heF9hbGlnbl90KT4oc2l6ZW9mKEhlYWRlcikpOyB9CisgICAgc3RhdGljIGNvbnN0
ZXhwciBzaXplX3QgaGVhZGVyU2l6ZSgpIHsgcmV0dXJuIHJvdW5kVXBUb011bHRpcGxlT2Y8YWxp
Z25vZihzdGQ6Om1heF9hbGlnbl90KT4oc2l6ZW9mKEhlYWRlcikpOyB9CiAKICAgICBzaXplX3Qg
bV9kYXRhU2l6ZSB7IDAgfTsKICAgICBSZWY8V2ViS2l0OjpTaGFyZWRNZW1vcnk+IG1fc2hhcmVk
TWVtb3J5Owo=
</data>
<flag name="review"
          id="440605"
          type_id="1"
          status="+"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>