|
From: Paul F. <pa...@so...> - 2025-09-19 20:42:48
|
https://sourceware.org/cgit/valgrind/commit/?id=3e30bd17b037f4f402a020f8674b1ae576c5cfcc commit 3e30bd17b037f4f402a020f8674b1ae576c5cfcc Author: Paul Floyd <pj...@wa...> Date: Fri Sep 19 19:57:07 2025 +0200 FreeBSD regtest: add syscall 9999 to scalar This provokes an unhandled syscall message, as is done on other platforms. Update filter since scalar runs on all FreeBSD platforms. Diff: --- coregrind/pub_core_aspacemgr.h | 2 +- memcheck/tests/freebsd/filter_scalar | 1 + memcheck/tests/freebsd/scalar.c | 5 +++++ memcheck/tests/freebsd/scalar.stderr.exp | 8 ++++++++ memcheck/tests/freebsd/scalar.stderr.exp-x86 | 8 ++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h index b867108a22..56c5b8dd10 100644 --- a/coregrind/pub_core_aspacemgr.h +++ b/coregrind/pub_core_aspacemgr.h @@ -340,7 +340,7 @@ extern Bool VG_(am_relocate_nooverlap_client)( /*OUT*/Bool* need_discard, #else # define VG_STACK_GUARD_SZB 8192 // 2 pages #endif -# define VG_DEFAULT_STACK_ACTIVE_SZB 1048576 // (4096 * 256) = 1Mb +# define VG_DEFAULT_STACK_ACTIVE_SZB 1048576 // (4096 * 256) = 1Mb typedef struct _VgStack VgStack; diff --git a/memcheck/tests/freebsd/filter_scalar b/memcheck/tests/freebsd/filter_scalar index 1e4f2d753e..2741038d1d 100755 --- a/memcheck/tests/freebsd/filter_scalar +++ b/memcheck/tests/freebsd/filter_scalar @@ -16,6 +16,7 @@ sed '/at 0x........: syscall (in \/...libc...)/d' | sed 's/SYS_freebsd12/ SYS/' | sed 's/SYS_freebsd13/ SYS/' | sed 's/SYS_freebsd14/ SYS/' | +sed 's/arm64-freebsd/amd64-freebsd/' | # get rid of error limit message diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index d327609ac7..acb4b662e7 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2594,6 +2594,11 @@ int main(void) FAKE_SY("\n"); #endif + // no such syscall... + GO(9999, "1e"); + SY(9999); FAIL; + + /* SYS_exit 1 */ GO(SYS_exit, "1s 0m"); SY(SYS_exit, x0); FAIL; diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 638e87bd62..2acb864e73 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5854,6 +5854,14 @@ Syscall param setgroups(list) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +9999: 9999 1e +--------------------------------------------------------- +WARNING: unhandled amd64-freebsd syscall: 9999 +You may be able to write your own handler. +Read the file README_MISSING_SYSCALL_OR_IOCTL. +Nevertheless we consider this a bug. Please report +it at http://valgrind.org/support/bug_reports.html. --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 7304090f5c..957ffb2058 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -5926,6 +5926,14 @@ Syscall param setgroups(list) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +9999: 9999 1e +--------------------------------------------------------- +WARNING: unhandled x86-freebsd syscall: 9999 +You may be able to write your own handler. +Read the file README_MISSING_SYSCALL_OR_IOCTL. +Nevertheless we consider this a bug. Please report +it at http://valgrind.org/support/bug_reports.html. --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- |