<?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>289999</bug_id>
          
          <creation_ts>2025-03-18 14:55:43 -0700</creation_ts>
          <short_desc>Crash in WebGeolocationClient::geolocationDestroyed</short_desc>
          <delta_ts>2025-06-10 13:50:39 -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>WebKit2</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="Chris Dumez">cdumez</assigned_to>
          <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2104170</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-03-18 14:55:43 -0700</bug_when>
    <thetext>When loading https://www.firstalert4.com/2024/08/29/explosion-causes-manhole-covers-blow-off-north-st-louis/ the page crashed immediately with the following stack trace. Unfortunately, it is not reproducible, but fortunately the problem is clear enough: WebGeolocationClient is dereferencing its WeakPtr m_page without first checking whether it&apos;s still valid, an obvious error since using WeakPtr indicates you expect the object to be destroyed out from under you.

(gdb) bt
#0  __pthread_kill_implementation (threadid=&lt;optimized out&gt;, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fef3c89ae23 in __pthread_kill_internal (threadid=&lt;optimized out&gt;, signo=6) at pthread_kill.c:78
#2  0x00007fef3c84208e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fef3c829882 in __GI_abort () at abort.c:79
#4  0x00007fef3d12fc5f in WTFCrashWithInfo () at WTF/Headers/wtf/Assertions.h:931
#5  0x00007fef3db4ad45 in WTF::WeakRef&lt;WebKit::WebPage, WTF::DefaultWeakPtrImpl&gt;::get (this=0x7fef1b1ad690) at WTF/Headers/wtf/WeakRef.h:103
#6  WebKit::WebGeolocationClient::geolocationDestroyed (this=0x7fef1b1ad680)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebCoreSupport/WebGeolocationClient.cpp:49
#7  0x00007fef3e72ee00 in WebCore::GeolocationController::~GeolocationController (this=0x7fef1b1dad80)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/Modules/geolocation/GeolocationController.cpp:56
#8  0x00007fef3e72f062 in WebCore::GeolocationController::~GeolocationController (this=0x2)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/Modules/geolocation/GeolocationController.cpp:48
#9  0x00007fef3f66f829 in std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt;::operator() (this=0x7fef1b1daee0, __ptr=0x2)
    at /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../include/c++/14.2.0/bits/unique_ptr.h:93
#10 std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt;::~unique_ptr (this=0x7fef1b1daee0)
    at /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../include/c++/14.2.0/bits/unique_ptr.h:398
#11 WTF::KeyValuePair&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;::~KeyValuePair (this=0x7fef1b1daed0) at WTF/Headers/wtf/KeyValuePair.h:33
#12 WTF::HashTable&lt;WTF::ASCIILiteral, WTF::KeyValuePair&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;, WTF::KeyValuePairKeyExtractor&lt;WTF::KeyValuePair&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt; &gt;, WTF::DefaultHash&lt;WTF::ASCIILiteral&gt;, WTF::HashMap&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt;, WTF::DefaultHash&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;, WTF::HashTableTraits, (WTF::ShouldValidateKey)0&gt;::KeyValuePairTraits, WTF::HashTraits&lt;WTF::ASCIILiteral&gt;, (WTF::ShouldValidateKey)0&gt;::deallocateTable (table=0x7fef1b1dae70)
    at WTF/Headers/wtf/HashTable.h:1202
#13 WTF::HashTable&lt;WTF::ASCIILiteral, WTF::KeyValuePair&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;, WTF::KeyValuePairKeyExtractor&lt;WTF::KeyValuePair&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt; &gt;, WTF::DefaultHash&lt;WTF::ASCIILiteral&gt;, WTF::HashMap&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt;, WTF::DefaultHash&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;, WTF::HashTableTraits, (WTF::ShouldValidateKey)0&gt;::KeyValuePairTraits, WTF::HashTraits&lt;WTF::ASCIILiteral&gt;, (WTF::ShouldValidateKey)0&gt;::~HashTable (this=0x7fef1a001810)
    at WTF/Headers/wtf/HashTable.h:429
#14 WTF::HashMap&lt;WTF::ASCIILiteral, std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt;, WTF::DefaultHash&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;WTF::ASCIILiteral&gt;, WTF::HashTraits&lt;std::unique_ptr&lt;WebCore::Supplement&lt;WebCore::Page&gt;, std::default_delete&lt;WebCore::Supplement&lt;WebCore::Page&gt; &gt; &gt; &gt;, WTF::HashTableTraits, (WTF::ShouldValidateKey)0&gt;::~HashMap (this=0x7fef1a001810) at WTF/Headers/wtf/Forward.h:151
#15 WebCore::Supplementable&lt;WebCore::Page&gt;::~Supplementable (this=0x7fef1a001810)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/platform/Supplementable.h:98
#16 WebCore::Page::~Page (this=0x7fef1a001800) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/page/Page.cpp:556
#17 0x00007fef3f518ec0 in WTF::RefCounted&lt;WebCore::Page&gt;::deref (this=0x7fef1a001808) at WTF/Headers/wtf/RefCounted.h:200
#18 WTF::RefCountedAndCanMakeWeakPtr&lt;WebCore::Page&gt;::deref (this=0x7fef1a001800) at WTF/Headers/wtf/RefCountedAndCanMakeWeakPtr.h:37
#19 WTF::DefaultRefDerefTraits&lt;WebCore::Page&gt;::derefIfNotNull (ptr=0x7fef1a001800) at WTF/Headers/wtf/Ref.h:62
#20 WTF::RefPtr&lt;WebCore::Page, WTF::RawPtrTraits&lt;WebCore::Page&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Page&gt; &gt;::~RefPtr (this=&lt;optimized out&gt;)
    at WTF/Headers/wtf/RefPtr.h:60
#21 WebCore::HistoryController::goToItem(WebCore::HistoryItem&amp;, WebCore::FrameLoadType, WebCore::ShouldTreatAsContinuingLoad)::$_0::~$_0()
    (this=&lt;optimized out&gt;) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/loader/HistoryController.cpp:318
#22 WTF::Detail::CallableWrapper&lt;WebCore::HistoryController::goToItem(WebCore::HistoryItem&amp;, WebCore::FrameLoadType, WebCore::ShouldTreatAsContinuingLoad)::$_0, void, bool&gt;::~CallableWrapper (this=&lt;optimized out&gt;) at WTF/Headers/wtf/Function.h:47
#23 WTF::Detail::CallableWrapper&lt;WebCore::HistoryController::goToItem(WebCore::HistoryItem&amp;, WebCore::FrameLoadType, WebCore::ShouldTreatAsContinuingLoad)::$_0, void, bool&gt;::~CallableWrapper (this=&lt;optimized out&gt;) at WTF/Headers/wtf/Function.h:47
#24 0x00007fef3d6c3e41 in WTF::Function&lt;void(IPC::Decoder*)&gt;::operator() (in=0x0, this=&lt;optimized out&gt;) at WTF/Headers/wtf/Function.h:82
#25 WTF::CompletionHandler&lt;void(IPC::Decoder*)&gt;::operator() (this=&lt;optimized out&gt;, in=0x0) at WTF/Headers/wtf/CompletionHandler.h:78
#26 IPC::Connection::sendMessageWithAsyncReply(WTF::UniqueRef&lt;IPC::Encoder&gt;&amp;&amp;, IPC::ConnectionAsyncReplyHandler, WTF::OptionSet&lt;IPC::SendOption&gt;, std::optional&lt;WTF::Thread::QOS&gt;)::$_0::operator()() (this=&lt;optimized out&gt;) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/Platform/IPC/Connection.cpp:711
#27 WTF::Detail::CallableWrapper&lt;IPC::Connection::sendMessageWithAsyncReply(WTF::UniqueRef&lt;IPC::Encoder&gt;&amp;&amp;, IPC::ConnectionAsyncReplyHandler, WTF::OptionSet&lt;IPC::SendOption&gt;, std::optional&lt;WTF::Thread::QOS&gt;)::$_0, void&gt;::call (this=&lt;optimized out&gt;) at WTF/Headers/wtf/Function.h:53
#28 0x00007fef3bf1b385 in WTF::Function&lt;void()&gt;::operator() (this=0x7ffc91d0b8d0) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/Function.h:82
#29 WTF::RunLoop::performWork (this=0x7fef1b0140e0) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/RunLoop.cpp:147
#30 0x00007fef3bfc881d in WTF::RunLoop::RunLoop()::$_0::operator()(void*) const (userData=0x2, userData@entry=0x7fef1b0140e0, this=&lt;optimized out&gt;)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#31 WTF::RunLoop::RunLoop()::$_0::__invoke(void*) (userData=0x2) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/glib/RunLoopGLib.cpp:79
#32 0x00007fef3bfc7ab1 in WTF::RunLoop::$_0::operator()
    (source=0x5560a427b740, callback=0x7fef3bfc8810 &lt;WTF::RunLoop::RunLoop()::$_0::__invoke(void*)&gt;, userData=0x7fef1b0140e0, this=&lt;optimized out&gt;)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#33 WTF::RunLoop::$_0::__invoke (source=0x5560a427b740, callback=0x7fef3bfc8810 &lt;WTF::RunLoop::RunLoop()::$_0::__invoke(void*)&gt;, userData=0x7fef1b0140e0)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/glib/RunLoopGLib.cpp:45
#34 0x00007fef3829ab1a in g_main_dispatch (context=context@entry=0x5560a423b9c0) at ../glib/gmain.c:3398
#35 0x00007fef3829ce37 in g_main_context_dispatch_unlocked (context=0x5560a423b9c0) at ../glib/gmain.c:4249
#36 g_main_context_iterate_unlocked (context=0x5560a423b9c0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../glib/gmain.c:4314
#37 0x00007fef3829d937 in g_main_loop_run (loop=0x5560a427b690) at ../glib/gmain.c:4516
#38 0x00007fef3bfc7f8d in WTF::RunLoop::run () at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WTF/wtf/glib/RunLoopGLib.cpp:108
#39 0x00007fef3dbeae34 in WebKit::AuxiliaryProcessMainBase&lt;WebKit::WebProcess, true&gt;::run (this=0x7ffc91d0bb20, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;)
--Type &lt;RET&gt; for more, q to quit, c to continue without paging--c
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/Shared/AuxiliaryProcessMain.h:77
#40 WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcessMainGtk&gt; (argc=4, argv=&lt;optimized out&gt;)
    at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/Shared/AuxiliaryProcessMain.h:103
#41 0x00007fef3c82b188 in __libc_start_call_main (main=main@entry=0x55608cbba150 &lt;main(int, char**)&gt;, argc=argc@entry=4, argv=argv@entry=0x7ffc91d0bcb8)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#42 0x00007fef3c82b24b in __libc_start_main_impl
    (main=0x55608cbba150 &lt;main(int, char**)&gt;, argc=4, argv=0x7ffc91d0bcb8, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffc91d0bca8) at ../csu/libc-start.c:360
#43 0x000055608cbba085 in _start () at ../sysdeps/x86_64/start.S:115</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105977</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-25 14:56:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/147875308&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122765</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2025-06-10 10:15:27 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46551</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2122820</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-06-10 13:50:36 -0700</bug_when>
    <thetext>Committed 296054@main (8ea398a5e6b3): &lt;https://commits.webkit.org/296054@main&gt;

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

    </bug>

</bugzilla>