<?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>329042</bug_id>
          
          <creation_ts>2026-10-27 00:23:46 -0700</creation_ts>
          <short_desc>REGRESSION(318915@main): ANGLE: QueryContext EGL_CONTEXT_MEMORY_USAGE_ANGLE crashes with a large number of reserved names</short_desc>
          <delta_ts>2026-10-28 11:30:24 -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>ANGLE</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          <dependson>190546</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Kimmo Kinnunen">kkinnunen</assigned_to>
          <cc>djg</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2269777</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2026-10-27 00:23:46 -0700</bug_when>
    <thetext>Since 318915@main (bug 190546), the GPU process queries EGL_CONTEXT_MEMORY_USAGE_ANGLE after the WebGL calls that change memory use. Context::getMemoryUsage() walks the buffer, texture and renderbuffer resource maps.

glGen* reserves a name by storing a null object in the resource map until the name is first bound. The ResourceMap iterator skips these null objects in its flat arrays, but returns them for names stored in its hash map, and getTotalMemorySize() dereferences them. WebKit&apos;s ANGLE stores names from 0x3000 up in the hash map.

To reproduce: generate more than 0x3000 buffer, texture or renderbuffer names without binding them, then query EGL_CONTEXT_MEMORY_USAGE_ANGLE. The query crashes in gl::Buffer::getMemorySize() (or the texture or renderbuffer equivalent) with a null object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2269778</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2026-10-27 00:24:02 -0700</bug_when>
    <thetext>&lt;rdar://189684244&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2269779</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2026-10-27 00:25:31 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/78406</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2270609</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-10-28 06:47:52 -0700</bug_when>
    <thetext>Committed 324979@main (ce11d7461d63): &lt;https://commits.webkit.org/324979@main&gt;

Reviewed commits have been landed. Closing PR #78406 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2270761</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-10-28 11:30:24 -0700</bug_when>
    <thetext>Committed ? (6f0ad1f18f18): &lt;https://commits.webkit.org/6f0ad1f18f18&gt;

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

    </bug>

</bugzilla>