[webkit-changes] [WebKit/WebKit] edebcc: Allow use-after-move to verify nullness in TestWTF...

EWS noreply at github.com
Wed Feb 22 16:42:17 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: edebcc5417a6ea19448825879a08b8925c3431e6
      https://github.com/WebKit/WebKit/commit/edebcc5417a6ea19448825879a08b8925c3431e6
  Author: Alex Christensen <achristensen at webkit.org>
  Date:   2023-02-22 (Wed, 22 Feb 2023)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WTF/CheckedPtr.cpp

  Log Message:
  -----------
  Allow use-after-move to verify nullness in TestWTF.WTF_CheckedPtr.CheckedRef API test
https://bugs.webkit.org/show_bug.cgi?id=252771

Reviewed by Ryosuke Niwa.

When you move from a CheckedRef, we call __asan_poison_memory_region to indicate you shouldn't use it,
and you shouldn't.  This test verifies that if you do call CheckedRef::ptr() you get null, which is
fine for the test to do.  We don't want to unpoison the memory in the production code, so I just call
__asan_unpoison_memory_region to allow the test to verify the use-after-move value.

* Tools/TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list