Help needed

Kris Wong wongk at
Thu Nov 8 13:58:01 UTC 2007

> Hi,
> The reason for the following valgrind-detected issue eludes
> me. It seems that
> the expression visitor uses a URL which has also been used by the
> ClassBrowser, but I don't see how/why it's been freed... any ideas?

Problem 1: QUrlPrivate::validate claims to be const, but it's not (seems to be common in Qt code).  It modifies the member "encodedOriginal" by setting it equal to another QByteArray (see implementation of QByteArray::operator=(const QByteArray&) - this is were the free is happening).

Problem 2: QUrlPrivate seems to be working with the internal data of "encodedOriginal".  If this data changes on one thread while another thread is working with the data - boom.

The call to "free" is not the problem.  Is this valgrind output supposed to be some sort of stack trace, or is it another type of output?

Kris Wong

More information about the KDevelop-devel mailing list