diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-08-03 11:00:03 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2009-08-03 11:00:03 +0200 |
commit | 2b7f0f786d1348729e0ce8a2784b48f67e116d2a (patch) | |
tree | c7f83f9d90e48d772855d2198e3b5001052126a6 /sysdeps/ia64 | |
parent | 50f823e4993cf6853caaa74fb1a6cd65b93688aa (diff) | |
parent | 4a1377672ca5472fac9096b4da72d26226b4aa59 (diff) |
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r-- | sysdeps/ia64/backtrace.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/ia64/backtrace.c b/sysdeps/ia64/backtrace.c index 423fed80a8..5cefb86ae4 100644 --- a/sysdeps/ia64/backtrace.c +++ b/sysdeps/ia64/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -61,7 +61,13 @@ backtrace_helper (struct _Unwind_Context *ctx, void *a) /* We are first called with address in the __backtrace function. Skip it. */ if (arg->cnt != -1) - arg->array[arg->cnt] = (void *) unwind_getip (ctx); + { + arg->array[arg->cnt] = (void *) unwind_getip (ctx); + + /* Check whether we make any progress. */ + if (arg->cnt > 0 && arg->array[arg->cnt - 1] == arg->array[arg->cnt]) + return _URC_END_OF_STACK; + } if (++arg->cnt == arg->size) return _URC_END_OF_STACK; return _URC_NO_REASON; |