[webkit-qt] possible bug in TextBreakIteratorQt.cpp ?
Baldeva, Arpit
abaldeva at ea.com
Fri Feb 18 15:20:33 PST 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110218/32ab0ed6/attachment.html>
More information about the webkit-qt
mailing list