REGRESSION(r249808): [GTK] Crash in JSC Config::permanentlyFreeze() on architecture...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2020 17:34:43 +0000 (17:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2020 17:34:43 +0000 (17:34 +0000)
commit0297636714fe6c2c26916219ca8644bd1cd4d3e5
tree718b3e33cf13b781e92249add18f83df27de7850
parent60578ace75d505bf4bdadea281c06a793d69fefa
REGRESSION(r249808): [GTK] Crash in JSC Config::permanentlyFreeze() on architecture ppc64el
https://bugs.webkit.org/show_bug.cgi?id=209236

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-03-23
Reviewed by Mark Lam.

Source/JavaScriptCore:

* heap/MarkedBlock.h: Use new CeilingOnPageSize.
* runtime/JSCConfig.cpp:
(JSC::Config::permanentlyFreeze): Use pageSize instead of vmPageSize.
* runtime/JSCConfig.h: Use new CeilingOnPageSize.

Source/WTF:

Add new CeilingOnPageSize constants, for use in JSC, in order to centralize our compile-time
page size guessing into one place. Improve the implementation of pageSize() to
RELEASE_ASSERT() when CeilingOnPageSize is wrong, so we can detect and fix it if so. (It
will be even easier to detect if we change RELEASE_ASSERT_WITH_MESSAGE() to actually print
its message in release builds.) Change pageSize() to use sysconf(_SC_PAGESIZE), which is
specified by POSIX, instead of getpagesize(), which is nonstandard.

* wtf/PageBlock.cpp:
(WTF::systemPageSize):
(WTF::pageSize):
* wtf/PageBlock.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/MarkedBlock.h
Source/JavaScriptCore/runtime/JSCConfig.cpp
Source/JavaScriptCore/runtime/JSCConfig.h
Source/WTF/ChangeLog
Source/WTF/wtf/PageBlock.cpp
Source/WTF/wtf/PageBlock.h