<?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>258409</bug_id>
          
          <creation_ts>2023-06-22 11:09:31 -0700</creation_ts>
          <short_desc>Skip JIT memory allocation in ExecutableAllocator::disableJIT() when running on an open source XNU.</short_desc>
          <delta_ts>2023-06-22 21:58:51 -0700</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>
          <dependson>258435</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1963092</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-06-22 11:09:31 -0700</bug_when>
    <thetext>The open source XNU does not support special handling of JIT memory.  However, macOS Safari and WebKit binaries still need to be able to run on the open source XNU, albeit without JIT.

However, ExecutableAllocator::disableJIT() is still trying to allocated JIT memory if the JIT entitlement is present (which is defined by the WebKit binary, not the kernel), and currently, will assert that the allocation succeeds.  We need to skip this allocation and assertion when running on open source XNU because the allocation is not necessary, and the assertion is invalid for the open source kernel and will fail every time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963093</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-06-22 11:09:42 -0700</bug_when>
    <thetext>rdar://111170164</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963101</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-06-22 11:29:48 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15204</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963179</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-22 17:49:28 -0700</bug_when>
    <thetext>Committed 265435@main (6063bc484b4f): &lt;https://commits.webkit.org/265435@main&gt;

Reviewed commits have been landed. Closing PR #15204 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963209</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2023-06-22 21:21:08 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 258435</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963218</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2023-06-22 21:52:30 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15226</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963221</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-22 21:58:46 -0700</bug_when>
    <thetext>Committed 265446@main (ee19c59a58e7): &lt;https://commits.webkit.org/265446@main&gt;

Reviewed commits have been landed. Closing PR #15226 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>