1. 25 Jul, 2018 1 commit
  2. 28 Jun, 2018 1 commit
  3. 07 Jun, 2018 1 commit
  4. 20 Apr, 2018 2 commits
  5. 07 Mar, 2018 2 commits
  6. 23 Feb, 2018 1 commit
  7. 22 Feb, 2018 2 commits
  8. 16 Feb, 2018 1 commit
  9. 15 Feb, 2018 1 commit
  10. 09 Feb, 2018 4 commits
  11. 22 Jan, 2018 1 commit
  12. 19 Jan, 2018 1 commit
  13. 09 Jan, 2018 5 commits
    • Derek Foreman's avatar
      client: Consume file descriptors destined for zombie proxies · 239ba393
      Derek Foreman authored
      We need to close file descriptors sent to zombie proxies to avoid leaking
      them, and perhaps more importantly, to prevent them from being dispatched
      in events on other objects (since they would previously be left in the
      buffer and potentially fed to following events destined for live proxies)
      Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    • Derek Foreman's avatar
      client: Replace the singleton zombie with bespoke zombies · 4485ed1f
      Derek Foreman authored
      Using the singleton zombie object doesn't allow us to posthumously retain
      object interface information, which makes it difficult to properly inter
      future events destined for the recently deceased proxy.
      Notably, this makes it impossible for zombie proxy destined file
      descriptors to be properly consumed.
      When we create a proxy, we now create a zombie-state object to hold
      information about the file descriptors in events it can receive. This
      will allow us, in a future patch, to close those FDs.
      [daniels: Split Derek's patch into a few smaller ones.]
      Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    • Daniel Stone's avatar
      client: Plug a race in proxy destruction vs. dispatch · 9744de9f
      Daniel Stone authored
      Closures created to hold events which will be dispatched on the client,
      take a reference to the proxy for the object the event was sent to, as
      well as the proxies for all objects referenced in that event.
      These references are dropped immediately before dispatch, with the
      display lock also being released. This leaves the potential for a
      vanishingly small race, where another thread drops the last reference
      on one of the proxies used in an event as it is being dispatched.
      Fix this by splitting decrease_closure_args_refcount into two functions:
      one which validates the objects (to ensure that clients are not returned
      objects which they have destroyed), and another which unrefs all proxies
      on the closure (object event was sent to, all referenced objects) as
      well as the closure itself. For symmetry, increase_closure_args_refcount
      is now the place where the refcount for the proxy for the object the
      event was sent to, is increased.
      This also happens to fix a bug: previously, if an event was sent to a
      client-destroyed object, and the event had object arguments, a reference
      would be leaked on the proxy for each of the object arguments.
      Found by inspection whilst reviewing the zombie-FD-leak series.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Cc: Jonas Ådahl <jadahl@gmail.com>
      Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    • Daniel Stone's avatar
      client: Add wl_proxy_unref helper · 430c7820
      Daniel Stone authored
      Rather than open-coded decrement-and-maybe-free, introduce a
      wl_proxy_unref helper to do this for us. This will come in useful for
      future patches, where we may also have to free a zombie object.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Cc: Jonas Ådahl <jadahl@gmail.com>
    • Daniel Stone's avatar
      client: Use refcount exclusively for destruction · b39d8933
      Daniel Stone authored
      Commit e273c7cd added a refcount to wl_proxy. The refcount is set to 1
      on creation, decreased when the client explicitly destroys the proxy,
      and is increased and decreased every time an event referencing that
      proxy is queued.
      Assuming no bugs, this means the refcount cannot reach 0 without the
      proxy being explicitly destroyed. However, some (not all) of the
      proxy-unref paths were only destroying the proxy if it had already been
      deleted. This should already be enforced by refcounting, so remove the
      check and rely solely on the refcount as the arbiter of when to free a
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Cc: Jonas Ådahl <jadahl@gmail.com>
  14. 28 Dec, 2017 4 commits
  15. 27 Dec, 2017 6 commits
  16. 11 Dec, 2017 1 commit
    • Matthew Hoosier's avatar
      client: Allow absolute paths in WAYLAND_DISPLAY · 1b6521e6
      Matthew Hoosier authored
      In order to support system compositor instances, it is necessary to
      allow clients' wl_display_connect() to find the compositor's listening
      socket somewhere outside of XDG_RUNTIME_DIR. For a full account, see
      the discussion beginning here:
      This change adjusts the client-side connection logic so that, if
      WAYLAND_DISPLAY is formatted as an absolute pathname, the socket
      connection attempt is made to just $WAYLAND_DISPLAY rather than
      usual user-private location $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.
      This change is based on Davide Bettio's submission of the same concept
      v4 changes:
      * Improved internal comments and some boundary-condition
        error checks in test case.
      * Refer to compositor as "Wayland server" rather than "Wayland
        display" in wl_display_connect() doxygen comments.
      * Remove redundant descriptions of parameter-interpretation
        mechanics from wl_display_connect() manpage. Reworked things
        to make it clear that 'name' and $WAYLAND_DISLAY are each
        capable of encoding absolute server socket paths.
      * Remove callout to reference implementation behavior in protocol
        documented. In its place there is now a simple statement that
        implementations can optionally support absolute socket paths.
      v3 changes:
      * Added test case.
      * Clarified documentation to note that 'name' parameter to wl_display_connect()
        can also be an absolute path.
      v2 changes:
      * Added backward incompatibility note to wl_display_connect() manpage.
      * Rephased wl_display_connect() manpage changes to precisely match actual
        changed behavior.
      * Added mention of new absolute path behavior in wl_display_connect()
        doxygen comments.
      * Mentioned new absolute path interpretation of WAYLAND_DISPLAY in
        protocol documentation.
      Signed-off-by: Matt Hoosier's avatarMatt Hoosier <matt.hoosier@gmail.com>
      Acked-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
  17. 04 Dec, 2017 5 commits
  18. 13 Oct, 2017 1 commit