[Mesa-users] Is there a better way to validate wl_display passed in at eglGetDispaly()?

Pekka Paalanen ppaalanen at gmail.com
Fri Jan 27 23:18:19 UTC 2017


On Fri, 27 Jan 2017 18:29:18 +0000
"Ruei, Eric" <e-ruei1 at ti.com> wrote:

> To whom it may concern:
> 
> We would like to bring your attention to a potential wayland-egl
> issue with openCV Python script.
> 
> The issue is that both Mesa and our mechanism to identify the
> wl_display  client from eglGetDIspaly() call fails for openCV
> Python script.

Hi,

I believe the only bullet-proof option is to stop using
eglGetDisplay with magical argument detection, and use
eglGetPlatformDisplay instead:
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_platform_wayland.txt

That said, libwayland-client.so and libwayland-server.so each
contain an identical definition of wl_display_interface symbol.
There has been talk about moving the duplicate parts into a third
new library loaded by both of the existing ones, but so far we
haven't seen an obvious benefit from it. Maybe this would be such a
case?

OTOH, the magical argument detection can never be reliable, so
fixing it while the underlying design is broken is questionable.

However, if you find the symbol wl_display_interface defined in any
other binary than libwayland-client.so and libwayland-server.so,
you might want to look into removing those. It will still leave the
two definitions, but if you insist, maybe those could be
consolidated by a careful linking order.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170128/db7c3ac5/attachment.sig>


More information about the wayland-devel mailing list