<?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>302521</bug_id>
          
          <creation_ts>2025-11-14 01:12:38 -0800</creation_ts>
          <short_desc>REGRESSION (Safari 26): AudioData.copyTo() crashes the tab with valid conversion</short_desc>
          <delta_ts>2025-12-18 22:06:23 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 26</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>hi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jean-yves.avenard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2158746</commentid>
    <comment_count>0</comment_count>
    <who name="">hi</who>
    <bug_when>2025-11-14 01:12:38 -0800</bug_when>
    <thetext>The following snippet crashes the tab, as of Safari Technology Preview 231, seems like code has not changed since.


```
const data = new AudioData({
	numberOfChannels: 3,
	data: new Float32Array([1, 1, 1]),
	format: &apos;f32&apos;,
	numberOfFrames: 1,
	sampleRate: 48000,
	timestamp: 0,
});

const dataBytes = new Float32Array(1);
data.copyTo(dataBytes, {planeIndex: 2, format: &apos;f32-planar&apos;});
console.log(dataBytes);
```

It&apos;s a `pac violation` according to Console.app.

What is happening here?
We have interleaved audio with 3 channels. We would like to turn this into planar audio (spec says: &quot;Conversion to f32-planar MUST always be supported&quot;).
The correct behavior would be to take every third element of the input array and copy that into the destination buffer.

Chrome correctly performs the conversion and returns `Float32Array([1])`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158820</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-11-14 09:34:53 -0800</bug_when>
    <thetext>This hits:

        RELEASE_ASSERT(sourcePlane.size() &gt;= sampleIndexIncrement * samples + sampleOffset - 1);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158821</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-11-14 09:34:58 -0800</bug_when>
    <thetext>&lt;rdar://problem/164730320&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158822</commentid>
    <comment_count>3</comment_count>
      <attachid>477397</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-11-14 09:35:18 -0800</bug_when>
    <thetext>Created attachment 477397
test case

Same test as an attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2164345</commentid>
    <comment_count>4</comment_count>
    <who name="Nipun Shukla">nipun_shukla</who>
    <bug_when>2025-12-08 23:13:45 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/55085</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167195</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-12-18 22:06:21 -0800</bug_when>
    <thetext>Committed 304728@main (3fe28c6ca996): &lt;https://commits.webkit.org/304728@main&gt;

Reviewed commits have been landed. Closing PR #55085 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>477397</attachid>
            <date>2025-11-14 09:35:18 -0800</date>
            <delta_ts>2025-11-14 09:35:18 -0800</delta_ts>
            <desc>test case</desc>
            <filename>302521.html</filename>
            <type>text/html</type>
            <size>307</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KY29uc3QgZGF0YSA9IG5ldyBBdWRpb0RhdGEoewoJbnVtYmVyT2ZDaGFubmVsczog
MywKCWRhdGE6IG5ldyBGbG9hdDMyQXJyYXkoWzEsIDEsIDFdKSwKCWZvcm1hdDogJ2YzMicsCglu
dW1iZXJPZkZyYW1lczogMSwKCXNhbXBsZVJhdGU6IDQ4MDAwLAoJdGltZXN0YW1wOiAwLAp9KTsK
CmNvbnN0IGRhdGFCeXRlcyA9IG5ldyBGbG9hdDMyQXJyYXkoMSk7CmRhdGEuY29weVRvKGRhdGFC
eXRlcywge3BsYW5lSW5kZXg6IDIsIGZvcm1hdDogJ2YzMi1wbGFuYXInfSk7CmNvbnNvbGUubG9n
KGRhdGFCeXRlcyk7Cjwvc2NyaXB0Pg==
</data>

          </attachment>
      

    </bug>

</bugzilla>