From: Paul Floyd Date: Fri, 19 Sep 2025 17:57:07 +0000 (+0200) Subject: FreeBSD regtest: add syscall 9999 to scalar X-Git-Tag: VALGRIND_3_26_0~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e30bd17b037f4f402a020f8674b1ae576c5cfcc;p=thirdparty%2Fvalgrind.git 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 --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h index b867108a2..56c5b8dd1 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 1e4f2d753..2741038d1 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 d327609ac..acb4b662e 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 638e87bd6..2acb864e7 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 7304090f5..957ffb205 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 ---------------------------------------------------------