Title: [294157] trunk/Source/WTF
Revision
294157
Author
[email protected]
Date
2022-05-13 07:54:08 -0700 (Fri, 13 May 2022)

Log Message

False positive warning when building RefCounter test with GCC 12
https://bugs.webkit.org/show_bug.cgi?id=239338

Patch by Michael Catanzaro <[email protected]> on 2022-05-13
Reviewed by Chris Dumez.

* Source/WTF/wtf/RefCounter.h:
(WTF::RefCounter<T>::Count::deref):

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

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (294156 => 294157)


--- trunk/Source/WTF/ChangeLog	2022-05-13 14:38:55 UTC (rev 294156)
+++ trunk/Source/WTF/ChangeLog	2022-05-13 14:54:08 UTC (rev 294157)
@@ -1,5 +1,16 @@
 2022-05-12  Michael Catanzaro  <[email protected]>
 
+        False positive warning when building RefCounter test with GCC 12
+        https://bugs.webkit.org/show_bug.cgi?id=239338
+        <rdar://problem/93204514>
+
+        Reviewed by Chris Dumez.
+
+        * wtf/RefCounter.h:
+        (WTF::RefCounter<T>::Count::deref):
+
+2022-05-12  Michael Catanzaro  <[email protected]>
+
         -Wattributes warnings from AtomString.cpp and WTFString.cpp
         https://bugs.webkit.org/show_bug.cgi?id=240358
 

Modified: trunk/Source/WTF/wtf/RefCounter.h (294156 => 294157)


--- trunk/Source/WTF/wtf/RefCounter.h	2022-05-13 14:38:55 UTC (rev 294156)
+++ trunk/Source/WTF/wtf/RefCounter.h	2022-05-13 14:54:08 UTC (rev 294157)
@@ -96,6 +96,8 @@
 {
     ASSERT(m_value);
 
+    // GCC gets confused here, see https://webkit.org/b/239338.
+IGNORE_GCC_WARNINGS_BEGIN("use-after-free")
     --m_value;
 
     if (m_refCounter && m_refCounter->m_valueDidChange) {
@@ -102,6 +104,7 @@
         SetForScope inCallback(m_inValueDidChange, true);
         m_refCounter->m_valueDidChange(RefCounterEvent::Decrement);
     }
+IGNORE_GCC_WARNINGS_END
 
     // The Count object is kept alive so long as either the RefCounter that created it remains
     // allocated, or so long as its reference count is non-zero.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to