<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239340</bug_id>
          
          <creation_ts>2022-04-14 09:14:35 -0700</creation_ts>
          <short_desc>-Wstringop-overflow warning in DocumentWriter.cpp</short_desc>
          <delta_ts>2022-05-13 10:59:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1861526</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-14 09:14:35 -0700</bug_when>
    <thetext>-Wstringop-overflow warnings are *usually* false positives. I will need to look closer at this one:

[3703/6690] Building CXX object Source/WebCore/CMakeFiles/...ivedSources/unified-sources/UnifiedSource-c57e08af-2.cpp.o
In file included from /usr/include/c++/12/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/12/memory:78,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/StdLibExtras.h:30,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/FastMalloc.h:26,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebCore/config.h:56,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp:27,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/DerivedSources/unified-sources/UnifiedSource-c57e08af-2.cpp:1:
In member function ‘std::__atomic_base&lt;_IntTp&gt;::__int_type std::__atomic_base&lt;_IntTp&gt;::operator++() [with _ITp = unsigned int]’,
    inlined from ‘void WTF::ThreadSafeRefCountedBase::ref() const’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/ThreadSafeRefCounted.h:60:9,
    inlined from ‘WTF::Ref&lt;T, &lt;template-parameter-1-2&gt; &gt;::Ref(T&amp;) [with T = WebCore::Frame; Traits = WTF::RawPtrTraits&lt;WebCore::Frame&gt;]’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/Ref.h:67:19,
    inlined from ‘void WebCore::DocumentWriter::end()’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/loader/DocumentWriter.cpp:299:32:
/usr/include/c++/12/bits/atomic_base.h:385:34: warning: ‘unsigned int __atomic_add_fetch_4(volatile void*, unsigned int, int)’ writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  385 |       { return __atomic_add_fetch(&amp;_M_i, 1, int(memory_order_seq_cst)); }
      |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868756</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-13 07:40:46 -0700</bug_when>
    <thetext>If there&apos;s anything wrong with this code, there is no way to know it from this nonsense. I will suppress it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868757</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-13 07:40:55 -0700</bug_when>
    <thetext>&lt;rdar://problem/93243931&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868760</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-13 07:47:42 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/609</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868802</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-05-13 10:59:28 -0700</bug_when>
    <thetext>Committed r294164 (250533@main): &lt;https://commits.webkit.org/250533@main&gt;

Reviewed commits have been landed. Closing PR #609 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>