mirror of
git://sourceware.org/git/valgrind.git
synced 2026-01-12 00:19:31 +08:00
FreeBSD 15 (out soon) and 16 (the dev branch) have changed the behaviour of ptrace. When vgdb uses ptrace to get Valgrind to poll gdbserver to get out of blocking syscalls the client may return a bogus result from the syscall. Setting the syscall to 0 turns off this change and all 3 affected testcases should return to normal behaviour. However, setting the syscall needs root privileges. So I've added a test to see if the syscall is present and set to 1. If it is the prereq is not satisfied.
17 lines
791 B
Plaintext
17 lines
791 B
Plaintext
# Tests the case when gdb sends a character to gdbserver while
|
|
# the gdbserver was forced invoked just before.
|
|
# gdbserver must send a signal to itself that is wait-ed for by vgdb.
|
|
# But if this signal is masked, then vgdb does not recuperate the control
|
|
# and Valgrind dies. See function give_control_back_to_vgdb in m_gdbserver.c
|
|
prog: sleepers
|
|
args: 1 10000000 0 -S-S-S-S 1
|
|
vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlsigvgdb
|
|
stderr_filter: filter_stderr
|
|
prereq: test -e gdb -a -f vgdb.invoker && ( ! ../tests/os_test freebsd || [ "$(sysctl -n debug.ptrace_attach_transparent 2>/dev/null || echo 0)" -eq 0 ] )
|
|
envB: LC_ALL=C
|
|
progB: gdb
|
|
argsB: --quiet -l 60 --nx ./sleepers
|
|
stdinB: nlsigvgdb.stdinB.gdb
|
|
stdoutB_filter: filter_gdb
|
|
stderrB_filter: filter_gdb
|