[Wayland-bugs] [Bug 75303] Protocol: wl_buffer.release is racy

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 17 05:06:24 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=75303

--- Comment #8 from Jonas Ådahl <jadahl at gmail.com> ---
Ok, yes I see it now.(In reply to Pekka Paalanen from comment #7)
> (In reply to Jonas Ådahl from comment #6)
> > Why can't we just let wl_buffer.release simply be a notification about the
> > buffer being reusable
> 
> Because it has exactly the race explained in the description of this bug.
> This example applies particular to Weston with gl-renderer and a client
> using wl_shm.

Yes, I see it now. Thanks for the more detailed explanation.

(In reply to Pekka Paalanen from comment #5)
> Client side reference counting, that is, for every committed attach there
> will be a release, seems like the preferred solution to me at the moment.

How do you expect the client to get the new semantics (one release per commit)
or do you mean to change it for everyone?

> 
> I've forgot the details related to the possibility of implementing
> wl_proxy_get_version(), but from what I recall, it should be perfectly
> doable since we already have runtime object version inheritance in
> libwayland-client (don't we?).

I don't think we do. The client needs to track this information itself. The
client just passes the version to the wl_registry.bind request and the server
uses that to adapt what it sends etc. We can't add it to wl_proxy because
sometimes (wl_buffer, wl_sync), the wl_proxy that is created does not inherit
the version of the parent proxy. Digging some, I found one field name "version"
(in wl_interface), but that is just the version that was in the XML file, hard
coded in the generated -protocol.c file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150917/4bc4cf5a/attachment.html>


More information about the wayland-bugs mailing list