D9319: Fix ASAN warnings in XDGForeignV2Interface
David Edmundson
noreply at phabricator.kde.org
Wed Dec 13 22:31:43 UTC 2017
davidedmundson created this revision.
Restricted Application added subscribers: Frameworks, plasma-devel.
Restricted Application added projects: Plasma on Wayland, Frameworks.
REVISION SUMMARY
The current code captures a char* from a wayland event in a lambda.
By creating the QString first when we capture that by value we'll
implicitly shallow copy it.
The other issue was
someHash.erase(it);
*it->foo();
Even though where the iterator points to is still valid, the iterator
itself is an object that gets modified in erase which ASAN didn't like.
TEST PLAN
Ran test.
Those particular errors went away
Tests passed
REPOSITORY
R127 KWayland
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D9319
AFFECTED FILES
src/server/xdgforeign_v2_interface.cpp
To: davidedmundson
Cc: plasma-devel, #frameworks, leezu, ZrenBot, alexeymin, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171213/a6ec5c7c/attachment.html>
More information about the Kde-frameworks-devel
mailing list