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
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@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@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
participants (2)
-
Benjamin Kalman
-
Ryosuke Niwa