diff options
author | Søren Sandmann <sandmann@redhat.com> | 2005-10-29 18:49:05 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-10-29 18:49:05 +0000 |
commit | deff3312e51f6e1159f9b1e13189e8a1c9d809d6 (patch) | |
tree | dd0a2f8588029bbde5c231f7dfc757daf7c8cfe1 | |
parent | 4e3416d41336731b788967ec9683f50edc52181c (diff) |
Fix crash pointed reported by Rudi Chiarito.
Sat Oct 29 14:43:00 2005 Søren Sandmann <sandmann@redhat.com>
Fix crash pointed reported by Rudi Chiarito.
* stackstash.c (stack_stash_add_trace): Just return if
n_addrs is 0.
* sysprof.c (on_read): Only trace if n_addresses != 0.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | stackstash.c | 3 | ||||
-rw-r--r-- | sysprof.c | 4 |
3 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,12 @@ +Sat Oct 29 14:43:00 2005 Søren Sandmann <sandmann@redhat.com> + + Fix crash pointed reported by Rudi Chiarito. + + * stackstash.c (stack_stash_add_trace): Just return if + n_addrs is 0. + + * sysprof.c (on_read): Only trace if n_addresses != 0. + Mon Oct 10 14:33:50 2005 Søren Sandmann <sandmann@redhat.com> * configure.ac: Add --disable-kernel-module option. Patch from diff --git a/stackstash.c b/stackstash.c index c7ecb1d..9f66f15 100644 --- a/stackstash.c +++ b/stackstash.c @@ -139,6 +139,9 @@ stack_stash_add_trace (StackStash *stash, StackNode *leaf; int i; + if (!n_addrs) + return; + trace = NULL; for (i = 0; i < n_addrs; ++i) trace = g_list_prepend (trace, GINT_TO_POINTER (addrs[i])); @@ -370,7 +370,7 @@ on_read (gpointer data) g_print ("-=-\n"); #endif - if (rd > 0 && !app->generating_profile) + if (rd > 0 && !app->generating_profile && trace.n_addresses) { Process *process = process_get_from_pid (trace.pid); int i; @@ -378,7 +378,7 @@ on_read (gpointer data) /* if (*trace.filename) */ /* filename = trace.filename; */ - + for (i = 0; i < trace.n_addresses; ++i) { process_ensure_map (process, trace.pid, |