[webkit-qt] possible bug in TextBreakIteratorQt.cpp ?

Antonio Gomes tonikitoo at gmail.com
Sat Feb 19 06:49:16 PST 2011


Maybe related: 39958 ? <https://bugs.webkit.org/show_bug.cgi?id=39958>

On Fri, Feb 18, 2011 at 6:20 PM, Baldeva, Arpit <abaldeva at ea.com> wrote:

> 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
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>
>


-- 
--Antonio Gomes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110219/4b923653/attachment.html>


More information about the webkit-qt mailing list