Problem investigating a heap-use-after-free in kwindowsystem

Martin Graesslin mgraesslin at kde.org
Fri Oct 2 20:24:00 UTC 2015


Hi all,

I added a new unit test to kwin today [1] and it failed on the CI system due 
to the enabled ASAN with an error in kwindowsystem. I'm able to reproduce it 
locally, but fail to understand it. To me the code and the test conditions 
looks correct. Relevant part of the bt:
#0 0x7f5198ac2c84 in strncpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x73c84)
    #1 0x7f5190b2be24 in nstrndup /home/martin/src/kf5/frameworks/
kwindowsystem/src/platforms/xcb/netwm.cpp:110
    #2 0x7f5190b425ff in NETRootInfo::update(QFlags<NET::Property>, 
QFlags<NET::Property2>) /home/martin/src/kf5/frameworks/kwindowsystem/src/
platforms/xcb/netwm.cpp:2142
    #3 0x7f5190b2f8bf in NETRootInfo::activate() /home/martin/src/kf5/
frameworks/kwindowsystem/src/platforms/xcb/netwm.cpp:614
    #4 0x7f519852be87 in KWin::VirtualDesktopManager::load() /home/martin/src/
kf5/kde/workspace/kwin/virtualdesktops.cpp:348

Full backtrace in [2]. The content of the list names is according to qDebug: 
("Desktop 1"). From trying with qdebug it seems to fail in the first iteration 
of the for loop.

Any help appreciated to get that fixed more than appreciated (I like my tests 
green ;-) ).

Cheers
Martin


[1] http://commits.kde.org/kwin/7fed20f13687035d6aa38e9ffa850259f757343d
[2] https://paste.kde.org/pdbwjaxqo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151002/d9df3c3a/attachment.sig>


More information about the Kde-frameworks-devel mailing list