[memprof: 47/76] add_leaf_to_tree: Avoid running into a crash
- From: Holger Hans Peter Freyther <hfreyther src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [memprof: 47/76] add_leaf_to_tree: Avoid running into a crash
- Date: Sun, 13 Jun 2010 03:42:11 +0000 (UTC)
commit a1e53322c7aedc6a0d7e54bf07234638461144d6
Author: Holger Hans Peter Freyther <zecke selfish org>
Date: Mon Oct 26 03:14:49 2009 +0100
add_leaf_to_tree: Avoid running into a crash
The crash is not well understood but the null check is avoiding
us to run into it right now. More work needs to be done to fully
understand it and properly fix it.
* src/profile.c:
(add_leaf_to_tree): Add null check in case node->parent was
NULL before we have reached the top node.
src/profile.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/profile.c b/src/profile.c
index ef9699c..fc6e622 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -360,7 +360,14 @@ add_leaf_to_tree (ProfileDescendantTree *tree, ProfileNode *leaf, ProfileNode *t
ProfileNode *node;
GList *trace = NULL;
- for (node = leaf; node != top->parent; node = node->parent)
+
+ /*
+ * XXX: FIXME: node->parent should always lead to a valid frame
+ * but it does not and more work needs to be done to figure out
+ * why this is the case. This can be easily reproduced with the
+ * GtkLauncher of WebKit/GTK+.
+ */
+ for (node = leaf; node && node != top->parent; node = node->parent)
trace = g_list_prepend (trace, node);
add_trace_to_tree (tree->roots, trace, leaf->self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]