<table><tr><td style="">cochise updated this revision to Diff 48384.<br />cochise added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17816">View Revision</a></tr></table><br /><div><div><p>As using qDebug supressed the error, I changed to qCWarning and managed to track the memory corruption. On my system, after getting the list of keys on source file, the local variable holding this file path gets corrupted. I'm using a code almost identical to official example [1], and enlarging the buffer, or allocating it on the heap didn't resoled the issue.<br />
A hackish workaround is to not store the file path after conversion (<tt style="background: #ebebeb; font-size: 13px;">const char*</tt>), and using <tt style="background: #ebebeb; font-size: 13px;">QUrl.path().toLocal8Bit().data();</tt> in all nine calls.<br />
I'm not happy with this solution, but I think I reached my limit here. Commiting this hackish version for review, and going to make some tests.</p>
<p>1 - <a href="http://man7.org/linux/man-pages/man2/listxattr.2.html" class="remarkup-link" target="_blank" rel="noreferrer">http://man7.org/linux/man-pages/man2/listxattr.2.html</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D17816?vs=48380&id=48384">https://phabricator.kde.org/D17816?vs=48380&id=48384</a></div></div><br /><div><strong>BRANCH</strong><div><div>xattr-copy-support (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17816">https://phabricator.kde.org/D17816</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/config-kiocore.h.cmake<br />
src/core/copyjob.cpp<br />
src/ioslaves/file/file_unix.cpp</div></div></div><br /><div><strong>To: </strong>cochise, dfaure<br /><strong>Cc: </strong>davidedmundson, ngraham, atha.kane, spoorun, nicolasfella, kde-frameworks-devel, michaelh, bruns<br /></div>