<?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>281626</bug_id>
          
          <creation_ts>2024-10-16 14:57:22 -0700</creation_ts>
          <short_desc>Use of Options::enableStrongRefTracker() breaks testapi in the Debug build.</short_desc>
          <delta_ts>2024-10-16 21:06: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>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=277835</see_also>
          <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="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2068574</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2024-10-16 14:57:22 -0700</bug_when>
    <thetext>ASSERTION FAILED: g_jscConfig.options.allowUnfinalizedAccess || g_jscConfig.options.isFinalized

    frame #0: 0x0000000109b45444 JavaScriptCore`WTFCrashWithInfo(line=141, file=&quot;/Volumes/Data/ws10/OpenSource/Source/JavaScriptCore/runtime/Options.h&quot;, function=&quot;static OptionsStorage::Bool &amp;JSC::Options::enableStrongRefTracker()&quot;, counter=736) at Assertions.h:901:5
    frame #1: 0x000000010868f6e4 JavaScriptCore`JSC::Options::enableStrongRefTracker() at Options.h:141:5
    frame #2: 0x000000010868f610 JavaScriptCore`JSC::StrongRefTracker::enabled() at Strong.h:43:1
    frame #3: 0x000000010868f5d8 JavaScriptCore`WTF::RefTrackerMixin&lt;JSC::StrongRefTracker&gt;::RefTrackerMixin(this=0x0000600002894028) at RefTrackerMixin.h:72:13
    frame #4: 0x000000010868f304 JavaScriptCore`WTF::RefTrackerMixin&lt;JSC::StrongRefTracker&gt;::RefTrackerMixin(this=0x0000600002894028) at RefTrackerMixin.h:69:5
    frame #5: 0x0000000108699470 JavaScriptCore`JSC::Strong&lt;JSC::JSObject, (JSC::ShouldStrongDestructorGrabLock)0&gt;::Strong(this=0x0000600002894018) at Strong.h:54:5
    frame #6: 0x000000010866a7fc JavaScriptCore`JSC::Strong&lt;JSC::JSObject, (JSC::ShouldStrongDestructorGrabLock)0&gt;::Strong(this=0x0000600002894018) at Strong.h:56:5
  * frame #7: 0x000000010866a790 JavaScriptCore`-[JSContext .cxx_construct](self=0x0000600002894000, _cmd=&quot;&quot;) at JSContext.mm:53:17
    frame #8: 0x0000000186e1beb8 libobjc.A.dylib`object_cxxConstructFromClass + 176
    frame #9: 0x0000000186e473f4 libobjc.A.dylib`objc_alloc_init + 80
    frame #10: 0x00000001000537e0 testapi`checkNegativeNSIntegers() at testapi.mm:1657:26
    frame #11: 0x0000000100052864 testapi`testObjectiveCAPI(filter=0x0000000000000000) at testapi.mm:2945:5
    frame #12: 0x000000010002621c testapi`main(argc=1, argv=0x000000016fdff3e0) at testapi.c:1589:5
    frame #13: 0x0000000186e60274 dyld`start + 2840

Caused by 284791@main due to https://bugs.webkit.org/show_bug.cgi?id=277835.

The reason is that StrongRefTracker::enabled() is assuming that JSC Options are initialized when they may not be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068577</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2024-10-16 15:03:12 -0700</bug_when>
    <thetext>rdar://138066602</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068580</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2024-10-16 15:13:56 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/35324</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068652</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-16 21:06:37 -0700</bug_when>
    <thetext>Committed 285304@main (49e3e2472395): &lt;https://commits.webkit.org/285304@main&gt;

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

    </bug>

</bugzilla>