Hi,

Occasionally I get a crash in following code in TextBreakIterator* 
setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType 
type, const UChar* string, int length).

if (iterator.isValid() && type == iterator.type() && length == iterator.length
            && memcmp(string, iterator.string, length) == 0) {
            iterator.toStart();
            return &iterator;
        }

It seems to me that iterator.string could be holding a stale pointer simply 
because it was a cached pointer from the last caller. I have not followed all 
the places in the code that calls this function to make sure that all the 
callers are holding the past UChar* but it seems unsafe to trust this pointer.

Anyone familiar with this code has an idea?

Thanks.
_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to