[webkit-reviews] review granted: [Bug 197062] Add option to dump JIT memory : [Attachment 367762] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 19 09:55:25 PDT 2019

Saam Barati <sbarati at apple.com> has granted Tadeu Zagallo
<tzagallo at apple.com>'s request for review:
Bug 197062: Add option to dump JIT memory

Attachment 367762: Patch


--- Comment #3 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 367762
  --> https://bugs.webkit.org/attachment.cgi?id=367762

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

> Source/JavaScriptCore/assembler/LinkBuffer.cpp:264
> +	   dumpJITMemory(outData, outData, m_executableMemory->sizeInBytes());

I think you want m_size here

> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:565
> +	       ASSERT(fd != -1);


> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:583
> +	   if (UNLIKELY(offset + size > bufferSize))

It’s unlikely this would happen, but you should just make the buffer size the
size of the jit memory pool. That way you’re guaranteed there is enough space
in it. This code here is wrong if a jitmemcpy copies > 32MB

More information about the webkit-reviews mailing list