Mir

mir_buffer_stream_release returns an unusable MirWaitHandle

Bug #1454937 reported by Chris Halse Rogers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
Undecided
Unassigned

Bug Description

mir_buffer_stream_release returns a MirWaitHandle that will be freed before it becomes ready. It is unsafe to use the return value of mir_buffer_stream_release in any way.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Failing actually fixing our whole WaitHandle infrastructure, stashing BufferStreams' wait handles in the Connection alongside the Surfaces' wait handles is probably the best bet.

Changed in mir:
importance: Undecided → Critical
importance: Critical → High
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Why would any release function need to give the client a wait handle? It's irrelevant to the client when the release is completed...

Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Bug 1454937] Re: mir_buffer_stream_release returns an unusable MirWaitHandle

This is a reasonable question.

At least one answer is that the client may have some per-object state
that it needs to clean up, and it wants guarantees that such state has
been cleaned up before proceeding.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Also - it is guaranteed that post release completion the object will
not have any callbacks generated for it. There's no point before
release completion with that guarantee.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I've not reviewed the changes over the past two years, but in the current codebase:

1. the wait handle isn't released before becoming ready
2. this function has been deprecated as part of the MirWaitHandle cleanup

Changed in mir:
status: Triaged → Invalid
importance: High → Undecided
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.