[webkit-dev] showTree crashes in gdb

Ryosuke Niwa rniwa at webkit.org
Sun Mar 20 23:09:35 PDT 2011


Maybe gdb is calling the right showTree?  (i.e. calling Node version for
Position, etc...).  I've had much fewer crashes since I started calling
n->showTreeForThis() instead of showTree(n).

- Ryosuke

On Sun, Mar 20, 2011 at 9:00 PM, Benjamin Kalman <kalman at chromium.org>wrote:

> Hi
>
> I've noticed ever since working with DOM and editing code that showTree
> often doesn't work.  As in, it segfaults from gdb (or prints Chinese
> characters rather than a DOM).  It seems to be especially bad recently;
> though this might just reflect my gradually diminishing patience.
>
> I had a brief look myself and came away with observations:
>
>    - It only happens from gdb's command line.  Compiling in a call to
>    showTree(foo) works, while breaking on that line and running "call
>    showTree(foo)" from gdb crashes.
>    - The segfault trace is different every time, but is usually in RefPtr
>    code.
>    - Sometimes "call showTree(foo)" will work, but calling it again will
>    crash.
>    - Stepping through showTree in gdb, IIRC the segfault happens right
>    after stepping out of one of the methods.  I can't remember which one, nor
>    whether it was predictably the same method.
>
> Hesitant conclusion: there is a bug in gdb tickled by something in RefPtr,
> perhaps the funky operator overriding behaviour, but my C++ isn't good
> enough to fully understand why this might happen.
>
> Has anybody else looked into this before?  It would be really really
> convenient to be able to rely on showTree.
>
> -- Ben
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110320/3a739e28/attachment.html>


More information about the webkit-dev mailing list