[webkit-reviews] review denied: [Bug 236436] [GTK][WPE] Improve device detection in the GbmDevice : [Attachment 451514] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 10 04:24:46 PST 2022


Chris Lord <clord at igalia.com> has denied Alejandro G. Castro
<alex at igalia.com>'s request for review:
Bug 236436: [GTK][WPE] Improve device detection in the GbmDevice
https://bugs.webkit.org/show_bug.cgi?id=236436

Attachment 451514: Patch

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




--- Comment #2 from Chris Lord <clord at igalia.com> ---
Comment on attachment 451514
  --> https://bugs.webkit.org/attachment.cgi?id=451514
Patch

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

Much better! However, this currently includes an invalid memory write error -
that needs to be addressed before commit and I think the other comment should
also be addressed to avoid possible errors in future. You can assume my r+ with
those fixed (but feel free to ping me for review if you aren't in a rush :))

> Source/WebCore/platform/graphics/gbm/GBMDevice.cpp:74
> +    memset(devices, 0, sizeof(drmDevicePtr) * 64);

This * 64 is incorrect, sizeof(drmDevicePtr) should be correct on its own.

> Source/WebCore/platform/graphics/gbm/GBMDevice.cpp:76
> +    int numDevices = drmGetDevices2(0, devices, 64);

Rather than putting 64 here, it would be good to use an array length macro
(something of the form `#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))` -
I expect we have something like this already in WTF?)


More information about the webkit-reviews mailing list