[webkit-changes] [WebKit/WebKit] 3ae0cd: Add assertions to ensure memcpySpan and memsetSpan...

Michael Catanzaro noreply at github.com
Wed Nov 15 17:05:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3ae0cd09762de6f9fd715033fc108bdf5fc1d3d0
      https://github.com/WebKit/WebKit/commit/3ae0cd09762de6f9fd715033fc108bdf5fc1d3d0
  Author: Michael Catanzaro <mcatanzaro at redhat.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M Source/WTF/wtf/Algorithms.h

  Log Message:
  -----------
  Add assertions to ensure memcpySpan and memsetSpan are used on trivially copyable spans
https://bugs.webkit.org/show_bug.cgi?id=264619

Reviewed by Darin Adler.

Bad things are likely to happen if used on objects with custom
constructors or destructors or assignment operators, because they won't
be executed. Add safety checks for this.

* Source/WTF/wtf/Algorithms.h:
(WTF::memcpySpan):
(WTF::memsetSpan):

Canonical link: https://commits.webkit.org/270796@main




More information about the webkit-changes mailing list