<?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>221198</bug_id>
          
          <creation_ts>2021-02-01 02:26:46 -0800</creation_ts>
          <short_desc>CeilingOnPageSize too low for Loongson CPUs</short_desc>
          <delta_ts>2022-02-15 07:47:51 -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>JavaScriptCore</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>InRadar</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="Nobody">webkit-unassigned</assigned_to>
          <cc>angelos</cc>
    
    <cc>benjamin</cc>
    
    <cc>berto</cc>
    
    <cc>cdumez</cc>
    
    <cc>chengzhpchn</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1724157</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-02-01 02:26:46 -0800</bug_when>
    <thetext>CeilingOnPageSize is set to 4KB for MIPS on Linux, but that value is not permitted on Loongson CPUs which have a 16KB page size:

https://sources.debian.org/src/linux/5.10.9-1/arch/mips/Kconfig/#L2213-L2215</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724169</commentid>
    <comment_count>1</comment_count>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2021-02-01 02:56:04 -0800</bug_when>
    <thetext>Our guess is that we are crashing in WTF::pageSize():

        RELEASE_ASSERT_WITH_MESSAGE(s_pageSize &lt;= CeilingOnPageSize, &quot;CeilingOnPageSize is too low, raise it in PageBlock.h!&quot;);

For Loongson CPUs that will be 16 &lt;= 4, which won&apos;t work.

We can change the general ceiling value for MIPS to something else, at least 16KB, or try to detect Loongson CPUs and change it just for those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724170</commentid>
    <comment_count>2</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-02-01 02:59:32 -0800</bug_when>
    <thetext>(In reply to Xan Lopez from comment #1)
&gt; We can change the general ceiling value for MIPS to something else,
&gt; at least 16KB, or try to detect Loongson CPUs and change it just for
&gt; those.

For distributions I don&apos;t think the latter is an option, because
there&apos;s no guarantee that the machine where the package is built is
the same where it is installed and run.

But I can patch that downstream if there&apos;s no good general solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1726575</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-02-08 02:27:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/74089683&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760472</commentid>
    <comment_count>4</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-05-15 14:13:58 -0700</bug_when>
    <thetext>This was fixed for 32-bit MIPS in r276583 (bug 225030), I think we should also do it for MIPS64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760485</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-05-15 15:46:19 -0700</bug_when>
    <thetext>(In reply to Alberto Garcia from comment #4)
&gt; This was fixed for 32-bit MIPS in r276583 (bug 225030), I think we should
&gt; also do it for MIPS64.

Do it!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760489</commentid>
    <comment_count>6</comment_count>
      <attachid>428747</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2021-05-15 15:57:25 -0700</bug_when>
    <thetext>Created attachment 428747
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760496</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-05-15 16:55:01 -0700</bug_when>
    <thetext>Committed r277551 (237779@main): &lt;https://commits.webkit.org/237779@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428747.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1841714</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-02-15 07:47:51 -0800</bug_when>
    <thetext>*** Bug 223721 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>428747</attachid>
            <date>2021-05-15 15:57:25 -0700</date>
            <delta_ts>2021-05-15 16:55:03 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>221198.diff</filename>
            <type>text/plain</type>
            <size>1513</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XVEYvQ2hhbmdlTG9nIGIvU291cmNlL1dURi9DaGFuZ2VMb2cK
aW5kZXggMGZhMWM3N2FiNDljLi5kODdkNTFmZGFmOWQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XVEYv
Q2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUgQEAKKzIw
MjEtMDUtMTUgIEFsYmVydG8gR2FyY2lhICA8YmVydG9AaWdhbGlhLmNvbT4KKworICAgICAgICBD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