Hi
the main reason why it looks like a false positive is that I've had
these valgrind warnings ... since probably ever, but it was never
causing issues.
I cannot tell from the sources if there is anything wrong, so I am
better asking here.
Well, that's the nature of undefined behaviour. Undefined doesn't mean
that it is non-deterministic.
And if you really do find false positives (which is always possible,
especially with new compiler releases) then please report them to us at
https://bugs.kde.org/enter_bug.cgi?product=valgrind
A+
Paul