about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-06-17 10:24:52 +0000
committerUlrich Drepper <drepper@redhat.com>1998-06-17 10:24:52 +0000
commite021cda255e14eebecde2fc1c92446e25a2ee761 (patch)
tree6746be232f86a08ad1d4d253907fafddd47b697a /sysdeps
parent0751550d36d19aed015a210f8c5868a1ee6508ed (diff)
downloadglibc-e021cda255e14eebecde2fc1c92446e25a2ee761.tar.gz
glibc-e021cda255e14eebecde2fc1c92446e25a2ee761.tar.xz
glibc-e021cda255e14eebecde2fc1c92446e25a2ee761.zip
Update.
1998-06-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/generic/backtrace.c (INNER_THAN): New definition, use it
	to compare stack addresses.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/backtrace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/generic/backtrace.c b/sysdeps/generic/backtrace.c
index 7ac1d5f2c4..2d329e19cf 100644
--- a/sysdeps/generic/backtrace.c
+++ b/sysdeps/generic/backtrace.c
@@ -44,6 +44,11 @@ extern void *__libc_stack_end;
 # define CURRENT_STACK_FRAME  ({ char __csf; &__csf; })
 #endif
 
+/* By default we assume that the stack grows downward.  */
+#ifndef INNER_THAN
+# define INNER_THAN <
+#endif
+
 struct layout
 {
   struct layout *next;
@@ -67,7 +72,8 @@ __backtrace (array, size)
   current = (struct layout *) top_frame;
   while (cnt < size)
     {
-      if ((void *) current < top_stack || (void *) current > __libc_stack_end)
+      if ((void *) current INNER_THAN top_stack
+	  || !((void *) current INNER_THAN __libc_stack_end))
        /* This means the address is out of range.  Note that for the
 	  toplevel we see a frame pointer with value NULL which clearly is
 	  out of range.  */