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.
This commit is contained in:
Søren Sandmann
2005-10-29 18:50:11 +00:00
committed by Søren Sandmann Pedersen
parent d598799b23
commit ba8f13a606
3 changed files with 14 additions and 2 deletions

View File

@ -300,7 +300,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;
@ -308,7 +308,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,