https://bugs.freedesktop.org/show_bug.cgi?id=108824
--- Comment #11 from Pierre-Eric Pelloux-Prayer pelloux@gmail.com --- Created attachment 144311 --> https://bugs.freedesktop.org/attachment.cgi?id=144311&action=edit wip patch
The following patch (applied on top of the problematic commit 78e35df52a) seems to fix the corruption problem (but I don't know the code enough to decide if it's a correct fix).