<?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>215521</bug_id>
          
          <creation_ts>2020-08-14 13:30:38 -0700</creation_ts>
          <short_desc>Crash in WebCore::AXObjectCache::rangeMatchesTextNearRange.</short_desc>
          <delta_ts>2020-08-15 10:16:25 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>214882</dup_id>
          
          <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="Andres Gonzalez">andresg_22</reporter>
          <assigned_to name="Andres Gonzalez">andresg_22</assigned_to>
          <cc>aboxhall</cc>
    
    <cc>apinheiro</cc>
    
    <cc>cfleizach</cc>
    
    <cc>darin</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>jcraig</cc>
    
    <cc>jdiggs</cc>
    
    <cc>samuel_white</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1680416</commentid>
    <comment_count>0</comment_count>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-14 13:30:38 -0700</bug_when>
    <thetext>Crash in WebCore::AXObjectCache::rangeMatchesTextNearRange.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680418</commentid>
    <comment_count>1</comment_count>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-14 13:40:06 -0700</bug_when>
    <thetext>&lt;rdar://problem/64773177&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680421</commentid>
    <comment_count>2</comment_count>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-14 13:42:49 -0700</bug_when>
    <thetext>      49 WebCore: WebCore::AXObjectCache::rangeMatchesTextNearRange(WebCore::SimpleRange const&amp;, WTF::String const&amp;) &lt;==
        49 WebCore: WebCore::AXObjectCache::rangeMatchesTextNearRange(WebCore::SimpleRange const&amp;, WTF::String const&amp;)
          49 WebCore: -[WebAccessibilityObjectWrapper rangeFromMarkers:withText:]
            49 WebCore: -[WebAccessibilityObjectWrapper textRectsFromMarkers:withText:]
              49 WebCore: __107-[UIKitWebAccessibilityObjectWrapper _accessibilityTextRectsForSpeakThisStringRange:string:wantsSentences:]_block_invoke
                49 AccessibilityUtilities: AXPerformSafeBlock
                  49 WebCore: -[UIKitWebAccessibilityObjectWrapper _accessibilityTextRectsForSpeakThisStringRange:string:wantsSentences:]
                    49 UIAccessibility: -[NSObject(AXPrivCategory) _iosAccessibilityAttributeValue:forParameter:]
                      27 WebProcess: __40+[AXWebProcessGlue _initializeAXRuntime]_block_invoke.175
                      | 27 AXRuntime: _copyParameterizedAttributeValueCallback
                      |   27 AXRuntime: ___AXXMIGCopyParameterizedAttributeValue_block_invoke
                      |     27 AXRuntime: _handleNonMainThreadCallback
                      |       27 AXRuntime: _AXXMIGCopyParameterizedAttributeValue
                      |         27 AXRuntime: _XCopyParameterizedAttributeValue
                      |           27 AXRuntime: mshMIGPerform
                      |             27 CoreFoundation: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
                      |               27 CoreFoundation: __CFRunLoopDoSource1
                      |                 27 CoreFoundation: __CFRunLoopRun
                      |                   27 CoreFoundation: CFRunLoopRunSpecific
                      |                     27 Foundation: -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
                      |                       27 Foundation: -[NSRunLoop(NSRunLoop) run]
                      |                         27 libxpc.dylib: _xpc_objc_main
                      |                           27 libxpc.dylib: xpc_main
                      |                             27 WebKit: WebKit::XPCServiceMain(int, char const**)
                      |                               27 libdyld.dylib: 
                      22 WebProcess: __40+[AXWebProcessGlue _initializeAXRuntime]_block_invoke.128
                        22 AXRuntime: _copyParameterizedAttributeValueCallback
                          22 AXRuntime: ___AXXMIGCopyParameterizedAttributeValue_block_invoke
                            22 AXRuntime: _handleNonMainThreadCallback
                              22 AXRuntime: _AXXMIGCopyParameterizedAttributeValue
                                22 AXRuntime: _XCopyParameterizedAttributeValue
                                  22 AXRuntime: mshMIGPerform
                                    22 CoreFoundation: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
                                      22 CoreFoundation: __CFRunLoopDoSource1
                                        22 CoreFoundation: __CFRunLoopRun
                                          22 CoreFoundation: CFRunLoopRunSpecific
                                            22 Foundation: -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
                                              22 Foundation: -[NSRunLoop(NSRunLoop) run]
                                                22 libxpc.dylib: _xpc_objc_main
                                                  22 libxpc.dylib: xpc_main
                                                    22 WebKit: WebKit::XPCServiceMain(int, char const**)
                                                      22 libdyld.dylib:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680422</commentid>
    <comment_count>3</comment_count>
      <attachid>406617</attachid>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-14 13:43:59 -0700</bug_when>
    <thetext>Created attachment 406617
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680439</commentid>
    <comment_count>4</comment_count>
      <attachid>406617</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-08-14 14:45:26 -0700</bug_when>
    <thetext>Comment on attachment 406617
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406617&amp;action=review

&gt; Source/WebCore/accessibility/AXObjectCache.cpp:2009
&gt; +    if (startPosition.isNull() || endPosition.isNull())
&gt; +        return WTF::nullopt;
&gt;  
&gt;      auto searchRange = makeSimpleRange(startPosition, endPosition);
&gt;      if (!searchRange || searchRange-&gt;collapsed())

This can’t be correct; it has no effect. When we call makeSimpleRange on start and end, if either is null, then the range returned is nullopt. So the check below this takes care of this case. So this change should have no effect, unless there is something further going on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680442</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-08-14 14:54:02 -0700</bug_when>
    <thetext>I am pretty sure this change won’t fix this bug, or any bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680443</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2020-08-14 14:55:35 -0700</bug_when>
    <thetext>Committed r265705: &lt;https://trac.webkit.org/changeset/265705&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406617.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680452</commentid>
    <comment_count>7</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2020-08-14 15:04:47 -0700</bug_when>
    <thetext>(In reply to Darin Adler from comment #5)
&gt; I am pretty sure this change won’t fix this bug, or any bug.

Any other ideas based on crash tracer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680456</commentid>
    <comment_count>8</comment_count>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-14 15:13:14 -0700</bug_when>
    <thetext>Reopening for further investigation based on Darin Adler’s comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680459</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-08-14 15:15:41 -0700</bug_when>
    <thetext>Based on our Apple internal CrashTracer data it looks like this was indeed on a crash on this line of code in this version of the file:

https://trac.webkit.org/browser/webkit/tags/Safari-610.1.15.50.3/Source/WebCore/accessibility/AXObjectCache.cpp

    auto searchRange = SimpleRange { *makeBoundaryPoint(startPosition), *makeBoundaryPoint(endPosition) };

That code assumes startPosition and endPosition can&apos;t be null.

I fixed the crash in &lt;https://trac.webkit.org/changeset/265044&gt; where I moved to the new null-checking version of makeSimpleRange and added a null check. So this additional change is unnecessary, since the bug was fixed 2 weeks ago. The CrashTracer reports are from before that point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680463</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-08-14 15:18:27 -0700</bug_when>
    <thetext>So that means that this patch was harmless, but unnecessary. And I suggest reverting it.

Unless there is some branch that diverged before r260544; that branch might benefit form this fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680477</commentid>
    <comment_count>11</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-08-14 15:35:11 -0700</bug_when>
    <thetext>So ... no rush, but please do revert these unnecessary additional checks at some point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680629</commentid>
    <comment_count>12</comment_count>
    <who name="Andres Gonzalez">andresg_22</who>
    <bug_when>2020-08-15 10:16:25 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 214882 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>406617</attachid>
            <date>2020-08-14 13:43:59 -0700</date>
            <delta_ts>2020-08-14 14:55:35 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-215521-20200814164358.patch</filename>
            <type>text/plain</type>
            <size>1836</size>
            <attacher name="Andres Gonzalez">andresg_22</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjY1NjY2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNTBkNzc1MDhiODQwMTIy
NmRjZWVlMm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