Title: [278976] trunk/Tools
Revision
278976
Author
hironori.fu...@sony.com
Date
2021-06-17 00:00:58 -0700 (Thu, 17 Jun 2021)

Log Message

[Win] TestWTF.WTF_WeakPtr.WeakHashMapIterators is crashing
https://bugs.webkit.org/show_bug.cgi?id=227102

Reviewed by Ryosuke Niwa.

A heap corruption was detected while a Derived class object was
destroyed as a Base class object.

* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::Base::~Base): Made Base class dtor virtual.
(TestWebKitAPI::Derived::~Derived):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (278975 => 278976)


--- trunk/Tools/ChangeLog	2021-06-17 06:19:31 UTC (rev 278975)
+++ trunk/Tools/ChangeLog	2021-06-17 07:00:58 UTC (rev 278976)
@@ -1,3 +1,17 @@
+2021-06-17  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [Win] TestWTF.WTF_WeakPtr.WeakHashMapIterators is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=227102
+
+        Reviewed by Ryosuke Niwa.
+
+        A heap corruption was detected while a Derived class object was
+        destroyed as a Base class object.
+
+        * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
+        (TestWebKitAPI::Base::~Base): Made Base class dtor virtual.
+        (TestWebKitAPI::Derived::~Derived):
+
 2021-06-16  Jonathan Bedard  <jbed...@apple.com>
 
         Clean up how platform images are handled in the bot watchers' dashboard

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp (278975 => 278976)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp	2021-06-17 06:19:31 UTC (rev 278975)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp	2021-06-17 07:00:58 UTC (rev 278976)
@@ -56,6 +56,8 @@
 public:
     Base() { }
 
+    virtual ~Base() = default;
+
     int foo()
     {
         return 0;
@@ -68,7 +70,7 @@
 public:
     Derived() { }
 
-    virtual ~Derived() { } // Force a pointer fixup when casting Base <-> Derived
+    ~Derived() override { } // Force a pointer fixup when casting Base <-> Derived
 
     int foo()
     {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to