- Fix a race in the testcase `gdb.threads/step-thread-exit.exp'.

This commit is contained in:
Jan Kratochvil 2008-11-09 21:04:28 +00:00
parent 917bed595e
commit 84892dcf86
3 changed files with 18 additions and 5 deletions

View File

@ -62,7 +62,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp 2006-07-12 03:22:30.000000000 -0300
@@ -0,0 +1,113 @@
@@ -0,0 +1,123 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 Free Software Foundation, Inc.
@ -137,7 +137,17 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+ }
+}
+
+gdb_test "bt" ".*sleep.*main.*$sleep_line.*" "backtrace after step 1"
+# Without this fixup we could end up in:
+# #0 0x00110416 in __kernel_vsyscall ()
+# #1 0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
+# #2 0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
+# #3 0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
+# #4 0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
+gdb_breakpoint "$sleep_line"
+gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
+gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
+
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
+
+runto_main
+gdb_breakpoint "$sleep_line"

View File

@ -38,5 +38,5 @@
}
+set timeout $timeout_old
gdb_test "bt" ".*sleep.*main.*$sleep_line.*" "backtrace after step 1"
# Without this fixup we could end up in:
# #0 0x00110416 in __kernel_vsyscall ()

View File

@ -13,7 +13,7 @@ Version: 6.8
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 29%{?_with_upstream:.upstream}%{?dist}
Release: 30%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
@ -892,6 +892,9 @@ fi
%endif
%changelog
* Sun Nov 9 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-30
- Fix a race in the testcase `gdb.threads/step-thread-exit.exp'.
* Sun Nov 9 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-29
- Fix more the variable-length-arrays support (BZ 468266, feature BZ 377541).
- Integrate the `bt full' protection (for BZ 466901) into the VLA patch.