D7870: Don't crash if a client (legally) uses a deleted global

Martin Flöser noreply at phabricator.kde.org
Mon Sep 18 19:13:33 UTC 2017


graesslin added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in blur_interface.cpp:49
> I don't get that. So your patch is quite enough, treat this note as a noise :)

The cast method here is only called from callbacks. Wayland works by having a global callback table where one just gets a wl_resource pointer which contains a reference to a user data. As long as the client doesn't call unbind on the wl_resource the pointer cannot dangle. That's why it won't happen here.

REPOSITORY
  R127 KWayland

BRANCH
  globalref

REVISION DETAIL
  https://phabricator.kde.org/D7870

To: davidedmundson, #plasma, graesslin
Cc: graesslin, anthonyfieroni, plasma-devel, #frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170918/dc204690/attachment.html>


More information about the Kde-frameworks-devel mailing list