Skip to content

unified and enhanced zombies plus delete_id request

Jonathan Leivent requested to merge jonleivent/wayland-idfix:idfix into main

Goal: to fully maintain object id -> interface mapping to properly demarshal messages (including fds) for both clients and servers while retaining full compatibility.

Note that this idfix branch is a cherry-picked/squashed "recipe" version (with slight modifications) of the work-log style main branch in this fork. The README on the main branch has a good (but lengthy) summary.

The first commit on the idfix branch contains 2 new tests that demonstrate the problems being addressed. These tests will fail in current libwayland. The second commit fixes this with a big change to wl_maps, folding zombie management into them. The third commit adds 2 new tests for these wl_map changes.

The final commit may be controversial because it adds a delete_id request by leveraging the existing protocol (it uses sync messages distinguished by having server object id args) so as to be drop-in compatible with existing clients and servers. This should perhaps be modified in the future.

Without the delete_id request, the patched server can still manage zombie reaping using a FIFO zombie list in the wl_map code with tunable length. Longer would reduce the probability of prematurely reaping a zombie. Even with the delete_id requests changes, this FIFO zombie list would be useful when the server has unpatched clients.

Signed-off-by: Jonathan Leivent (jleivent@comcast.net)

Edited by Jonathan Leivent

Merge request reports