[webkit-reviews] review granted: [Bug 235720] Reland StructureID overhaul : [Attachment 450155] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 27 10:47:22 PST 2022


Yusuke Suzuki <ysuzuki at apple.com> has granted Keith Miller
<keith_miller at apple.com>'s request for review:
Bug 235720: Reland StructureID overhaul
https://bugs.webkit.org/show_bug.cgi?id=235720

Attachment 450155: Patch

https://bugs.webkit.org/attachment.cgi?id=450155&action=review




--- Comment #2 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 450155
  --> https://bugs.webkit.org/attachment.cgi?id=450155
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450155&action=review

r=me

> Source/JavaScriptCore/heap/StructureAlignedMemoryAllocator.cpp:105
> +	   MarkedBlock* block =
reinterpret_cast<MarkedBlock*>(g_jscConfig.startOfStructureHeap) + freeIndex *
MarkedBlock::blockSize;
> +	   constexpr bool writable = true;
> +	   constexpr bool executable = false;
> +	   OSAllocator::commit(block, MarkedBlock::blockSize, writable,
executable);

Let's mprotect READ | WRITE in debug build.

> Source/JavaScriptCore/heap/StructureAlignedMemoryAllocator.cpp:111
> +	   OSAllocator::decommit(blockPtr, MarkedBlock::blockSize);

Let's mprotect NONE in debug build.

> Source/JavaScriptCore/heap/StructureAlignedMemoryAllocator.cpp:149
> +void StructureAlignedMemoryAllocator::commitBlock(void* block)
> +{
> +    constexpr bool writable = true;
> +    constexpr bool executable = false;
> +    OSAllocator::commit(block, MarkedBlock::blockSize, writable,
executable);
> +}

Let's mprotect READ | WRITE in debug build.

> Source/JavaScriptCore/heap/StructureAlignedMemoryAllocator.cpp:154
> +void StructureAlignedMemoryAllocator::decommitBlock(void* block)
> +{
> +    OSAllocator::decommit(block, MarkedBlock::blockSize);
> +}

Let's mprotect NONE in debug build.


More information about the webkit-reviews mailing list