<?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>204107</bug_id>
          
          <creation_ts>2019-11-12 01:24:35 -0800</creation_ts>
          <short_desc>valgrind: Source and destination overlap in memcpy_chk()</short_desc>
          <delta_ts>2022-07-01 14:40:33 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>DoNotImportToRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Milan Crha">mcrha</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1589478</commentid>
    <comment_count>0</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-11-12 01:24:35 -0800</bug_when>
    <thetext>I just noticed this when running WebKitWebProcess of 2.26.2 release under valgrind. It showed when starting evolution.

==9353== Thread 1:
==9353== Source and destination overlap in memcpy_chk(0x1ffeffc117, 0x1ffeffc116, 8)
==9353==    at 0x4840960: __memcpy_chk (vg_replace_strmem.c:1595)
==9353==    by 0x5E18C00: UnknownInlinedFun (string_fortified.h:40)
==9353==    by 0x5E18C00: cssValueKeywordID&lt;char16_t&gt; (CSSPropertyParser.cpp:190)
==9353==    by 0x5E18C00: WebCore::cssValueKeywordID(WTF::StringView) (CSSPropertyParser.cpp:208)
==9353==    by 0x5E18D21: WebCore::CSSParserToken::id() const [clone .part.0] (CSSParserToken.cpp:310)
==9353==    by 0x5E3B6AB: WebCore::CSSPropertyParser::consumeCSSWideKeyword(WebCore::CSSPropertyID, bool) (CSSPropertyParser.cpp:352)
==9353==    by 0x5E471C9: WebCore::CSSPropertyParser::parseValueStart(WebCore::CSSPropertyID, bool) (CSSPropertyParser.cpp:317)
==9353==    by 0x5E4748F: WebCore::CSSPropertyParser::parseValue(WebCore::CSSPropertyID, bool, WebCore::CSSParserTokenRange const&amp;, WebCore::CSSParserContext const&amp;, WTF::Vector&lt;WebCore::CSSProperty, 256ul, WTF::CrashOnOverflow, 16ul&gt;&amp;, WebCore::StyleRuleBase::Type) (CSSPropertyParser.cpp:277)
==9353==    by 0x5E0B390: WebCore::CSSParserImpl::consumeDeclarationValue(WebCore::CSSParserTokenRange, WebCore::CSSPropertyID, bool, WebCore::StyleRuleBase::Type) (CSSParserImpl.cpp:850)
==9353==    by 0x5E0F5E6: WebCore::CSSParserImpl::consumeDeclaration(WebCore::CSSParserTokenRange, WebCore::StyleRuleBase::Type) (CSSParserImpl.cpp:833)
==9353==    by 0x5E0FAA1: WebCore::CSSParserImpl::consumeDeclarationList(WebCore::CSSParserTokenRange, WebCore::StyleRuleBase::Type) (CSSParserImpl.cpp:771)
==9353==    by 0x5E12141: WebCore::CSSParserImpl::consumeStyleRule(WebCore::CSSParserTokenRange, WebCore::CSSParserTokenRange) (CSSParserImpl.cpp:742)
==9353==    by 0x5E124B6: WebCore::CSSParserImpl::consumeQualifiedRule(WebCore::CSSParserTokenRange&amp;, WebCore::CSSParserImpl::AllowedRulesType) (CSSParserImpl.cpp:471)
==9353==    by 0x5E141CE: consumeRuleList&lt;WebCore::CSSParserImpl::parseStyleSheet(const WTF::String&amp;, const WebCore::CSSParserContext&amp;, WebCore::StyleSheetContents*, WebCore::CSSParser::RuleParsing)::&lt;lambda(WTF::RefPtr&lt;WebCore::StyleRuleBase&gt;)&gt; &gt; (CSSParserImpl.cpp:385)
==9353==    by 0x5E141CE: WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&amp;, WebCore::CSSParserContext const&amp;, WebCore::StyleSheetContents*, WebCore::CSSParser::RuleParsing) (CSSParserImpl.cpp:247)
==9353==    by 0x5DFE79E: WebCore::StyleSheetContents::parseString(WTF::String const&amp;) (StyleSheetContents.cpp:347)
==9353==    by 0x5D489B7: WebCore::parseUASheet(WTF::String const&amp;) (CSSDefaultStyleSheets.cpp:114)
==9353==    by 0x5D4D2F1: WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle() (CSSDefaultStyleSheets.cpp:179)
==9353==    by 0x5D4D825: WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(WebCore::Element const&amp;) (CSSDefaultStyleSheets.cpp:207)
==9353==    by 0x5DF5190: WebCore::StyleResolver::styleForElement(WebCore::Element const&amp;, WebCore::RenderStyle const*, WebCore::RenderStyle const*, WebCore::RuleMatchingBehavior, WebCore::SelectorFilter const*) (StyleResolver.cpp:373)
==9353==    by 0x5EAD978: WebCore::Document::styleForElementIgnoringPendingStylesheets(WebCore::Element&amp;, WebCore::RenderStyle const*, WebCore::PseudoId) (Document.cpp:2120)
==9353==    by 0x5EE7B03: WebCore::Element::resolveComputedStyle() (Element.cpp:3160)
==9353==    by 0x5EE7E87: computedStyle (Element.cpp:3199)
==9353==    by 0x5EE7E87: WebCore::Element::computedStyle(WebCore::PseudoId) (Element.cpp:3189)
==9353==    by 0x6125AEF: WebCore::HTMLTitleElement::computedTextWithDirection() (HTMLTitleElement.cpp:84)
==9353==    by 0x6125C5B: WebCore::HTMLTitleElement::childrenChanged(WebCore::ContainerNode::ChildChange const&amp;) (HTMLTitleElement.cpp:72)
==9353==    by 0x5E7FB13: executeNodeInsertionWithScriptAssertion&lt;WebCore::ContainerNode::parserAppendChild(WebCore::Node&amp;)::&lt;lambda()&gt; &gt; (ContainerNode.cpp:204)
==9353==    by 0x5E7FB13: WebCore::ContainerNode::parserAppendChild(WebCore::Node&amp;) (ContainerNode.cpp:746)
==9353==    by 0x61AC2FC: insert (HTMLConstructionSite.cpp:114)
==9353==    by 0x61AC2FC: insert (HTMLConstructionSite.cpp:103)
==9353==    by 0x61AC2FC: executeInsertTask (HTMLConstructionSite.cpp:121)
==9353==    by 0x61AC2FC: executeTask (HTMLConstructionSite.cpp:175)
==9353==    by 0x61AC2FC: WebCore::HTMLConstructionSite::insertTextNode(WTF::String const&amp;, WebCore::WhitespaceMode) (HTMLConstructionSite.cpp:606)
==9353==    by 0x61DDDEF: WebCore::HTMLTreeBuilder::processCharacterBuffer(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer&amp;) (HTMLTreeBuilder.cpp:2421)
==9353==    by 0x61DF50B: WebCore::HTMLTreeBuilder::processCharacter(WebCore::AtomicHTMLToken&amp;&amp;) (HTMLTreeBuilder.cpp:2191)
==9353==    by 0x61DFC54: WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomicHTMLToken&amp;&amp;) (HTMLTreeBuilder.cpp:350)
==9353==    by 0x61B7190: WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLTokenizer::TokenPtr&amp;) (HTMLDocumentParser.cpp:348)
==9353==    by 0x61B7368: WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&amp;) (HTMLDocumentParser.cpp:285)
==9353==    by 0x61B769A: WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) (HTMLDocumentParser.cpp:303)
==9353==    by 0x61B8436: WebCore::HTMLDocumentParser::append(WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;&amp;&amp;) (HTMLDocumentParser.cpp:417)
==9353==    by 0x5E96198: WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter&amp;, char const*, unsigned long) (DecodedDataDocumentParser.cpp:50)
==9353==    by 0x62C5A96: WebCore::DocumentLoader::commitData(char const*, unsigned long) (DocumentLoader.cpp:1160)
==9353==    by 0x53D5635: WebKit::WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) (WebFrameLoaderClient.cpp:1094)
==9353==    by 0x62C272E: WebCore::DocumentLoader::commitLoad(char const*, int) (DocumentLoader.cpp:1047)
==9353==    by 0x6370304: notifyClientsDataWasReceived (CachedRawResource.cpp:136)
==9353==    by 0x6370304: WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) (CachedRawResource.cpp:128)
==9353==    by 0x6370675: updateBuffer (CachedRawResource.cpp:73)
==9353==    by 0x6370675: WebCore::CachedRawResource::updateBuffer(WebCore::SharedBuffer&amp;) (CachedRawResource.cpp:57)
==9353==    by 0x633B427: WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::RefPtr&lt;WebCore::SharedBuffer, WTF::DumbPtrTraits&lt;WebCore::SharedBuffer&gt; &gt;&amp;&amp;, long long, WebCore::DataPayloadType) (SubresourceLoader.cpp:481)
==9353==    by 0x633B596: WebCore::SubresourceLoader::didReceiveData(char const*, unsigned int, long long, WebCore::DataPayloadType) (SubresourceLoader.cpp:449)
==9353==    by 0x4F40B68: callMemberFunctionImpl&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(const IPC::DataReference&amp;, long int), std::tuple&lt;IPC::DataReference, long int&gt;, 0, 1&gt; (HandleMessage.h:41)
==9353==    by 0x4F40B68: callMemberFunction&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(const IPC::DataReference&amp;, long int), std::tuple&lt;IPC::DataReference, long int&gt; &gt; (HandleMessage.h:47)
==9353==    by 0x4F40B68: void IPC::handleMessage&lt;Messages::WebResourceLoader::DidReceiveData, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long)&gt;(IPC::Decoder&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long)) (HandleMessage.h:120)
==9353==    by 0x503E3F3: IPC::Connection::dispatchMessage(IPC::Decoder&amp;) (Connection.cpp:939)
==9353==    by 0x503F66C: IPC::Connection::dispatchMessage(std::unique_ptr&lt;IPC::Decoder, std::default_delete&lt;IPC::Decoder&gt; &gt;) (Connection.cpp:991)
==9353==    by 0x504073E: IPC::Connection::dispatchOneIncomingMessage() (Connection.cpp:1060)
==9353==    by 0xA01DD24: WTF::RunLoop::performWork() (in /usr/lib64/libjavascriptcoregtk-4.0.so.18.14.7)
==9353==    by 0xA06A88C: ??? (in /usr/lib64/libjavascriptcoregtk-4.0.so.18.14.7)
==9353==    by 0x89AB49F: g_main_dispatch (gmain.c:3179)
==9353==    by 0x89AB49F: g_main_context_dispatch (gmain.c:3844)
==9353==    by 0x89AB82F: g_main_context_iterate.isra.0 (gmain.c:3917)
==9353==    by 0x89ABB22: g_main_loop_run (gmain.c:4111)
==9353==    by 0xA06B2FF: WTF::RunLoop::run() (in /usr/lib64/libjavascriptcoregtk-4.0.so.18.14.7)
==9353==    by 0x543DD29: int WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt;(int, char**) (AuxiliaryProcessMain.h:66)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>