Make use of wl_global_remove
If a global is removed at the same time a client binds to it the client is in an undefined state and is likely to crash. For example:
server announces global ->
-> client receives global
<- client binds
server destroys global ->
-> server receives bind
invalid id!
server disconnects client ->
-> client receives global destroyed
-> client receives disconnect
To mitigate this issue wl_global_remove
was introduced in libwayland 1.17.90. It should be called at first when a global is about to vanish and some unspecified time later finally wl_global_destroy
. This way clients will be informed by libwayland about the upcoming destroy while still being able to conclude a pending bind until finally wl_global_destroy
is called.
This problem was observed (pipeline from kwinft!7 (merged)) in the KWinFT internal window autotest where a wl_output is quickly removed after being added.
Tasks
-
Add timer -
Reenable autotest
Edited by Adrien Faveraux