[webkit-reviews] review granted: [Bug 239916] [Mac] VTVideoDecoderClass object pointers can become unaligned on x86 : [Attachment 458617] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 29 16:49:57 PDT 2022


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 239916: [Mac] VTVideoDecoderClass object pointers can become unaligned on
x86
https://bugs.webkit.org/show_bug.cgi?id=239916

Attachment 458617: Patch

https://bugs.webkit.org/attachment.cgi?id=458617&action=review




--- Comment #3 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 458617
  --> https://bugs.webkit.org/attachment.cgi?id=458617
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458617&action=review

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP8Decoder.cpp:61
> +struct DecoderBaseClass {
>      uint8_t pad[padSize];
>      CMBaseClass alignedClass;
>  };

Can we put this in WebKitDecoder.h so it can be shared by the decoders?

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP8Decoder.cpp:86
> +static_assert(offsetof(DecoderBaseClass, alignedClass) == padSize,
"CMBaseClass offset is incorrect!");
> +static_assert(alignof(DecoderBaseClass) == 4, "CMBaseClass must have 4 byte
alignment");

Ditto

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP8Decoder.cpp:95
> +#pragma pack(push, 4)
> +struct DecoderClass {
> +    uint8_t pad[padSize];
> +    VTVideoDecoderClass alignedClass;
> +};

Ditto

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP8Decoder.cpp:122
> +static_assert(offsetof(DecoderClass, alignedClass) == padSize, "CMBaseClass
offset is incorrect!");
> +static_assert(alignof(DecoderClass) == 4, "CMBaseClass must have 4 byte
alignment");

Ditto


More information about the webkit-reviews mailing list