about summary refs log tree commit diff
path: root/debug
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-03-20 18:24:51 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-03-20 18:24:51 -0300
commit6869471f35da6446d5d83faf154256a2fccce9b3 (patch)
tree3d9b26cfa8b4386cd55e9436ea5b7058e190defc /debug
parentfe5012e47407914ec1a66f8337f6adfba6c42680 (diff)
parent263e6175999bc7f5adb8b32fd12fcfae3f0bb05a (diff)
downloadglibc-ibm/2.26/master.tar.gz
glibc-ibm/2.26/master.tar.xz
glibc-ibm/2.26/master.zip
Merge branch release/2.26/master into ibm/2.26/master ibm/2.26/master
Diffstat (limited to 'debug')
-rw-r--r--debug/tst-backtrace5.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/debug/tst-backtrace5.c b/debug/tst-backtrace5.c
index 0b85e4482e..57b7dee0f6 100644
--- a/debug/tst-backtrace5.c
+++ b/debug/tst-backtrace5.c
@@ -88,6 +88,18 @@ handle_signal (int signum)
       }
   /* Symbol names are not available for static functions, so we do not
      check do_test.  */
+
+  /* Check that backtrace does not return more than what fits in the array
+     (bug 25423).  */
+  for (int j = 0; j < NUM_FUNCTIONS; j++)
+    {
+      n = backtrace (addresses, j);
+      if (n > j)
+	{
+	  FAIL ();
+	  return;
+	}
+    }
 }
 
 NO_INLINE int