<?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>315034</bug_id>
          
          <creation_ts>2026-05-18 12:13:31 -0700</creation_ts>
          <short_desc>Occasional crash in CollectionIndexCache::~CollectionIndexCache while running moveBefore tests.</short_desc>
          <delta_ts>2026-05-19 11:51:28 -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>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="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>cdumez</cc>
    
    <cc>csaavedra</cc>
    
    <cc>darbinyan</cc>
    
    <cc>lwarlow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2211777</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2026-05-18 12:13:31 -0700</bug_when>
    <thetext>We occasionally see a CheckedPtr crash in CollectionIndexCache while running moveBefore tests:

e.g.
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   JavaScriptCore                	       0x12f796350 WTFCrash + 0
1   WebCore                       	       0x30033d61c WTF::CanMakeCheckedPtrBase&lt;WTF::SingleThreadIntegralWrapper&lt;unsigned int&gt;, unsigned int, bool, (WTF::CheckedPtrDeleteCheckException)0&gt;::crashDueToCheckedPtrToDeadObject() + 16
2   WebCore                       	       0x30033d5f8 WTF::CanMakeCheckedPtrBase&lt;WTF::SingleThreadIntegralWrapper&lt;unsigned int&gt;, unsigned int, bool, (WTF::CheckedPtrDeleteCheckException)0&gt;::decrementCheckedPtrCount() const + 44
3   WebCore                       	       0x3005cfaec WTF::CheckedPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;&gt;::derefIfNotNull() + 56
4   WebCore                       	       0x3005cfaa4 WTF::CheckedPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;&gt;::~CheckedPtr() + 32
5   WebCore                       	       0x3005cf7e4 WTF::CheckedPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;&gt;::~CheckedPtr() + 32
6   WebCore                       	       0x300ef0b20 WebCore::ElementIterator&lt;WebCore::Element&gt;::~ElementIterator() + 48
7   WebCore                       	       0x301d0978c WebCore::ElementChildIterator&lt;WebCore::Element&gt;::~ElementChildIterator() + 32
8   WebCore                       	       0x301c3f42c WebCore::ElementChildIterator&lt;WebCore::Element&gt;::~ElementChildIterator() + 32
9   WebCore                       	       0x3076985e8 WebCore::CollectionIndexCache&lt;WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;, WebCore::ElementChildIterator&lt;WebCore::Element&gt;&gt;::~CollectionIndexCache() + 44
10  WebCore                       	       0x3076985ac WebCore::CollectionIndexCache&lt;WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;, WebCore::ElementChildIterator&lt;WebCore::Element&gt;&gt;::~CollectionIndexCache() + 32
11  WebCore                       	       0x307687010 WebCore::CachedHTMLCollection&lt;WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;&gt;::~CachedHTMLCollection() + 116
12  WebCore                       	       0x307686f8c WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;::~GenericCachedHTMLCollection() + 32
13  WebCore                       	       0x307687048 WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;::~GenericCachedHTMLCollection() + 32
14  WebCore                       	       0x307687078 WebCore::GenericCachedHTMLCollection&lt;(WebCore::CollectionType)11&gt;::~GenericCachedHTMLCollection() + 32
15  WebCore                       	       0x301081de8 WTF::RefCounted&lt;JSC::EmbedderArrayLike&gt;::deref() const + 100
16  WebCore                       	       0x301081d48 WTF::DefaultRefDerefTraits&lt;WebCore::HTMLCollection&gt;::derefIfNotNull(WebCore::HTMLCollection*) + 44
17  WebCore                       	       0x301081cd8 WTF::Ref&lt;WebCore::HTMLCollection, WTF::RawPtrTraits&lt;WebCore::HTMLCollection&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::HTMLCollection&gt;&gt;::~Ref() + 64
18  WebCore                       	       0x301008cd0 WTF::Ref&lt;WebCore::HTMLCollection, WTF::RawPtrTraits&lt;WebCore::HTMLCollection&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::HTMLCollection&gt;&gt;::~Ref() + 32
19  WebCore                       	       0x302697988 WebCore::JSDOMWrapper&lt;WebCore::HTMLCollection, WTF::RawPtrTraits&lt;WebCore::HTMLCollection&gt;&gt;::~JSDOMWrapper() + 36
20  WebCore                       	       0x302697954 WebCore::JSHTMLCollection::~JSHTMLCollection() + 32
21  WebCore                       	       0x3025ec904 WebCore::JSHTMLCollection::~JSHTMLCollection() + 32
22  WebCore                       	       0x3001008d4 WebCore::JSHTMLCollection::destroy(JSC::JSCell*) + 36

&lt;rdar://177337493&gt;&lt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2211782</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2026-05-18 12:22:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/65120</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2211834</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2026-05-18 15:03:42 -0700</bug_when>
    <thetext>rdar://177337493</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2211835</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-18 15:04:37 -0700</bug_when>
    <thetext>Committed 313444@main (958ef3d92e6e): &lt;https://commits.webkit.org/313444@main&gt;

Reviewed commits have been landed. Closing PR #65120 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2212132</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2026-05-19 11:30:00 -0700</bug_when>
    <thetext>*** Bug 315048 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2212147</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2026-05-19 11:51:28 -0700</bug_when>
    <thetext>*** Bug 315031 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>