<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashes on PPC64 due to mprotect() on address not aligned to the page size"
   href="https://bugs.webkit.org/show_bug.cgi?id=130237">bug 130237</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #266795 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashes on PPC64 due to mprotect() on address not aligned to the page size"
   href="https://bugs.webkit.org/show_bug.cgi?id=130237#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashes on PPC64 due to mprotect() on address not aligned to the page size"
   href="https://bugs.webkit.org/show_bug.cgi?id=130237">bug 130237</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=266795&amp;action=diff" name="attach_266795" title="Make commitSize at least as big as the page size">attachment 266795</a> <a href="attachment.cgi?id=266795&amp;action=edit" title="Make commitSize at least as big as the page size">[details]</a></span>
Make commitSize at least as big as the page size

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=266795&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=266795&amp;action=review</a>

commitSIze is only needed when &quot;#if !ENABLE(JIT)&quot;.  Let's put it in the appropriate sections.

<span class="quote">&gt; Source/JavaScriptCore/interpreter/JSStack.cpp:46
&gt;  static StaticLock stackStatisticsMutex;
&gt;  #endif // !ENABLE(JIT)
&gt;  
&gt; +static size_t commitSize;</span >

Move the commitSize declaration just below committedBytesCount above.

<span class="quote">&gt; Source/JavaScriptCore/interpreter/JSStack.cpp:58
&gt; +    commitSize = std::max(16 * 1024, getpagesize());
&gt; +
&gt;  #if !ENABLE(JIT)</span >

Move this initialization below the #if !ENABLE(JIT).

Also, it may not matter much but the commitSize value should only be set once, not every time we construct a new JSStack.  Perhaps it would be better to have static function and use that instead wherever you use commitSize currently in JSStack.cpp:

static size_t commitSize()
{
    static size_t size = 0;
    if (!size)
        size = std::max(16 * 1024, getpagesize());
    return size;
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>