kwin/src/wayland
Martin Gräßlin d1a09838e1 [server] Prevent double delete of callback resources in SurfaceInterface
Summary:
When destroying a SurfaceInterface all callbacks are getting destroyed.
This used to iterate over the callbacks and performing
wl_resource_destroy on them. This triggered the destroy handler which
removes the resource from the callback list. Which means removing from
the list we are iterating on. This could result in a double delete or
accessing invalid memory.

This change copies all callbacks to a temporary list and clears the
normal lists. So the destroy handler does no longer modify the lists
currently being iterated on.

Test Plan: Added a test case which crashed with previous code

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1677
2016-05-25 09:03:10 +02:00
..
autotests [server] Prevent double delete of callback resources in SurfaceInterface 2016-05-25 09:03:10 +02:00
server [server] Add resource nullptr check to ShellSurfaceInterface 2016-05-23 14:20:54 +02:00
tests [tests] Add a sub-surface test application 2016-03-21 16:03:31 +01:00
tools Initialize Interface factory pointer to fix Coverity warning. 2016-05-04 21:14:07 -04:00
.arcconfig Add .arcconfig 2016-01-25 10:53:57 +01:00
.reviewboardrc Add Review Board configuration 2014-09-21 11:33:11 +02:00
blur_interface.cpp [server] Make s_version a static member of private class 2015-09-10 09:23:36 +02:00
blur_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
clientconnection.cpp [server] Expose executable path in ClientConnection 2016-01-25 10:56:16 +01:00
clientconnection.h pid_t is defined in sys/types.h 2016-05-10 08:47:20 +02:00
CMakeLists.txt [server] Add implementation for server side decoration protocol 2015-12-17 13:29:38 +01:00
compositor_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
compositor_interface.h [server] Another round of docu improvements 2015-09-09 17:31:13 +02:00
contrast_interface.cpp [server] Make s_version a static member of private class 2015-09-10 09:23:36 +02:00
contrast_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
COPYING.LIB Change to LGPLv2+ 2014-09-17 15:57:56 +02:00
datadevice_interface.cpp [server] Implement support for drag'n'drop through pointer device 2016-03-02 08:18:41 +01:00
datadevice_interface.h [server] Implement support for drag'n'drop through pointer device 2016-03-02 08:18:41 +01:00
datadevicemanager_interface.cpp Increase version requirements for wl_data_device_release 2015-09-15 08:44:42 +02:00
datadevicemanager_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
dataoffer_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
dataoffer_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
datasource_interface.cpp [server] Implement support for drag'n'drop through pointer device 2016-03-02 08:18:41 +01:00
datasource_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
display.cpp [server] Add implementation for server side decoration protocol 2015-12-17 13:29:38 +01:00
display.h [server] Add implementation for server side decoration protocol 2015-12-17 13:29:38 +01:00
dpms_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
dpms_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
dpms_interface_p.h [server] Make s_version a static member of private class 2015-09-10 09:23:36 +02:00
fakeinput_interface.cpp [server] Make s_version a static member of private class 2015-09-10 09:23:36 +02:00
fakeinput_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
idle_interface.cpp [server] Minimum supported idle timeout is 5 sec 2015-12-08 14:15:08 +01:00
idle_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
keyboard_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
keyboard_interface.h API doc improvements 2015-09-09 13:49:58 +02:00
keyboard_interface_p.h [server] Pass keyboard focus to child surface on pointer click 2016-04-07 07:57:00 +02:00
KF5WaylandConfig.cmake.in
Mainpage.dox Add Mainpage.dox to triggeri apidocs generation 2015-09-19 17:16:54 +02:00
output_interface.cpp [server] Fix possible crash after deleting an output(device)interface 2015-11-17 16:37:01 +01:00
output_interface.h [server] Add more documentation 2015-09-10 13:36:42 +02:00
plasmashell_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
plasmashell_interface.h [server] Declare metatype for KWayland::Server::PlasmaShellSurfaceInterface::Role 2016-03-09 16:16:29 +01:00
plasmawindowmanagement_interface.cpp server/plasmawindowmanagement_interface.cpp - fix -Wreorder warning 2016-05-17 16:24:44 -04:00
plasmawindowmanagement_interface.h Improve the deconstruction of PlasmaWindows 2016-05-12 10:55:07 +02:00
pointer_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
pointer_interface.h [server] Another round of docu improvements 2015-09-09 17:31:13 +02:00
pointer_interface_p.h [server] Split PoointerInterface::Private into dedicated header 2016-04-06 11:27:42 +02:00
region_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
seat_interface.cpp [server] Compare ClientConnection instead of wl_client in SeatInterface 2016-05-23 10:43:45 +02:00
seat_interface.h [server] Implement support for drag'n'drop through pointer device 2016-03-02 08:18:41 +01:00
seat_interface_p.h [server] Implement support for drag'n'drop through pointer device 2016-03-02 08:18:41 +01:00
server_decoration_interface.cpp Add a default mode event to ServerSideDecorationManager 2016-03-12 12:29:31 +01:00
server_decoration_interface.h [server] Add implementation for server side decoration protocol 2015-12-17 13:29:38 +01:00
shadow_interface.cpp [server] Make s_version a static member of private class 2015-09-10 09:23:36 +02:00
shadow_interface.h Add a Shadow protocol 2015-07-15 11:11:30 +02:00
slide_interface.cpp [server] Less warnings please 2015-09-10 11:09:38 +02:00
slide_interface.h Interface for a Slide effect 2015-09-09 17:37:36 +02:00
subcompositor_interface.cpp Fix compilation with gcc 4.8 2016-03-29 16:33:44 +02:00
subcompositor_interface.h Version 5.7 becomes version 5.22 2016-04-27 07:43:43 +02:00
subsurface_interface_p.h Add a parentResource to Resource 2014-11-20 16:40:14 +01:00
surface_interface.cpp [server] Prevent double delete of callback resources in SurfaceInterface 2016-05-25 09:03:10 +02:00
surface_interface.h Version 5.7 becomes version 5.22 2016-04-27 07:43:43 +02:00
surface_interface_p.h [server] Add damage tracking feature to SurfaceInterface 2016-04-04 08:59:27 +02:00
touch_interface.cpp [server] Improve the handling when clients disconnect 2016-05-19 16:21:27 +02:00
touch_interface.h API doc improvements 2015-09-09 13:49:58 +02:00