[Webkit-unassigned] [Bug 130237] Crashes on PPC64 due to mprotect() on address not aligned to the page size
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 7 12:58:13 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=130237
Mark Lam <mark.lam at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #266795|review? |review-
Flags| |
--- Comment #5 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 266795
--> https://bugs.webkit.org/attachment.cgi?id=266795
Make commitSize at least as big as the page size
View in context: https://bugs.webkit.org/attachment.cgi?id=266795&action=review
commitSIze is only needed when "#if !ENABLE(JIT)". Let's put it in the appropriate sections.
> Source/JavaScriptCore/interpreter/JSStack.cpp:46
> static StaticLock stackStatisticsMutex;
> #endif // !ENABLE(JIT)
>
> +static size_t commitSize;
Move the commitSize declaration just below committedBytesCount above.
> Source/JavaScriptCore/interpreter/JSStack.cpp:58
> + commitSize = std::max(16 * 1024, getpagesize());
> +
> #if !ENABLE(JIT)
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;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151207/a87fd746/attachment.html>
More information about the webkit-unassigned
mailing list