• Alexandros Frantzis's avatar
    winewayland.drv: Ensure Wayland surface handlers don't access invalid data. · a7ec328f
    Alexandros Frantzis authored
    In our setup with a dedicated event dispatch thread, libwayland ensures
    that object proxies associated with an event handler remain valid (or
    NULL) while the handler is executing. However, no such guarantees are
    given for the proxy user data. It is thus possible for the user data to
    become invalid (e.g., its memory freed from a different thread) right
    after the event handler is entered.
    
    This is an issue for wayland_surface associated proxies since they may
    receive unsolicited events from the compositor at any time (e.g.,
    xdg_surface.configure), even while we are destroying the
    wayland_surface.
    
    To avoid the problem, we introduce a lock that protects access
    to xdg_surface user data and ensures that the associated wayland_surface
    remains valid for the duration of the handler.
    Co-authored-by: 's avatarRémi Bernon <rbernon@codeweavers.com>
    a7ec328f
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...