[webkit-reviews] review granted: [Bug 203228] Don't use memmove/memcpy for memory that can be scanned concurrently : [Attachment 381630] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 22 16:57:57 PDT 2019


Yusuke Suzuki <ysuzuki at apple.com> has granted Saam Barati <sbarati at apple.com>'s
request for review:
Bug 203228: Don't use memmove/memcpy for memory that can be scanned
concurrently
https://bugs.webkit.org/show_bug.cgi?id=203228

Attachment 381630: patch

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




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

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

r=me with one comment.

> Source/JavaScriptCore/heap/GCMemoryOperations.h:72
> +	   bitwise_cast<JSValue*>(destination)[i] = JSValue();

In 32bit arch, JSValue() is not zero IIRC (EmptyTag exists). But it is also
possible that caller of gcSafeZeroMemory intends to fill them with JSEmpty (and
we were using memset with 0 incorrectly).
Can you check,

1. Whether the caller wants to fill it with 0, or wants to fill it with JSEmpty
2. If the caller want to fill it with JSEmpty, I think we need to have some
other name here since JSEmpty in 32bit is not zero.


More information about the webkit-reviews mailing list