Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5c21c07292c41f88492dbfffc604f89bc8d0779
      
https://github.com/WebKit/WebKit/commit/f5c21c07292c41f88492dbfffc604f89bc8d0779
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-09-21 (Mon, 21 Sep 2026)

  Changed paths:
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH264.mm
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm

  Log Message:
  -----------
  Crash in RTCFrameDecodeParams when using cmake build
https://bugs.webkit.org/show_bug.cgi?id=324691
rdar://187961949

Reviewed by Youenn Fablet.

On a --cmake --debug mac build, run-webkit-tests --cmake --debug 
imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any.html?h264_annexb
(and ?h264_avc, and the .worker variants) kills the GPU process with
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x1 on 
com.apple.coremedia.asyncpixeltransfer.

RTCFrameDecodeParams is defined in both RTCVideoDecoderH264 and 
RTCVideoDecoderVTBVP9

ld keeps the first weak definition and the two build systems order the files 
oppositely.
CMakeLists.txt:2313 (VP9) precedes (H264) → VP9's destructor wins → H264 
crashes.
Xcode's Sources phase lists H264 first → H264's trivial destructor wins → the 
VP9 path silently leaks a block,
which no test catches. Release is immune: at -O3 everything inlines and
no symbol survives to collide.

Depending on which version wins during the resolution, as we release the object 
at
offset 0;
If RTCVideoDecoderH264.mm version wins, we have an int64_t and the destructor 
is trivial: no crashes
If RTCVideoDecoderVTBVP9.mm version wins, we have RTCVideoDecoderCallback 
callback (ARC block)
and objc_release is called on offset 0 -> crash.

we copy the approach used in RTCFrameEncodeParams
and place each structure in an anonymous namespace.

* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:
(RTCFrameDecodeParams::RTCFrameDecodeParams): Deleted.
(): Deleted.
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm:
(RTCFrameDecodeParams::RTCFrameDecodeParams): Deleted.

Canonical link: https://commits.webkit.org/321492@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to