<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mark.lam@apple.com" title="Mark Lam <mark.lam@apple.com>"> <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@apple.com" title="Mark Lam <mark.lam@apple.com>"> <span class="fn">Mark Lam</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=266795&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&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&action=review">https://bugs.webkit.org/attachment.cgi?id=266795&action=review</a>
commitSIze is only needed when "#if !ENABLE(JIT)". Let's put it in the appropriate sections.
<span class="quote">> Source/JavaScriptCore/interpreter/JSStack.cpp:46
> static StaticLock stackStatisticsMutex;
> #endif // !ENABLE(JIT)
>
> +static size_t commitSize;</span >
Move the commitSize declaration just below committedBytesCount above.
<span class="quote">> Source/JavaScriptCore/interpreter/JSStack.cpp:58
> + commitSize = std::max(16 * 1024, getpagesize());
> +
> #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>