|
From: Paul F. <pa...@so...> - 2026-02-27 19:33:49
|
https://sourceware.org/cgit/valgrind/commit/?id=5826ae56e202fe9008335fca98ab95d2e09b60ef commit 5826ae56e202fe9008335fca98ab95d2e09b60ef Author: Paul Floyd <pj...@wa...> Date: Fri Feb 27 20:31:10 2026 +0100 FreeBSD syscall: add pdrfork as sys_ni_syscall rfork with a process descriptor. I'm not sure if we'll ever properly support any form of rfork. Diff: --- coregrind/m_syswrap/priv_syswrap-freebsd.h | 4 ++-- coregrind/m_syswrap/syswrap-freebsd.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index f8e3b7a5e9..32da698a26 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -84,7 +84,7 @@ DECL_TEMPLATE(freebsd, sys_fchflags) // 35 DECL_TEMPLATE(freebsd, sys_freebsd10_pipe) // 42 // generic getegid 43 // generic profil redirect to ni_syscall 44 -// sys_ktrace refirect to ni_syscall 45 +// sys_ktrace redirect to ni_syscall 45 // generic getgid 47 DECL_TEMPLATE(freebsd, sys_getlogin) // 49 DECL_TEMPLATE(freebsd, sys_setlogin) // 50 @@ -553,7 +553,7 @@ DECL_TEMPLATE(freebsd, sys_inotify_rm_watch) // 594 DECL_TEMPLATE(freebsd, sys_jail_attach_jd) // 597 DECL_TEMPLATE(freebsd, sys_jail_remove_jd) // 598 DECL_TEMPLATE(freebsd, sys_kexec_load) // 599 -DECL_TEMPLATE(freebsd, sys_pdrfork) // 600 +// generic sys_pdrfork redirect to ni_syscall 600 DECL_TEMPLATE(freebsd, sys_pdwait) // 601 DECL_TEMPLATE(freebsd, sys_fake_sigreturn) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 0bf93d87d5..ac7243d453 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -8078,6 +8078,9 @@ const SyscallTableEntry ML_(syscall_table)[] = { BSDX_(__NR_jail_attach_jd, sys_jail_attach_jd), // 597 BSDX_(__NR_jail_remove_jd, sys_jail_remove_jd), // 598 BSDX_(__NR_kexec_load, sys_kexec_load), // 599 + // we only have partial support for rfork, so mark pdrfork + // as not implemented for the moment + GENX_(__NR_pdrfork, sys_ni_syscall), // 600 BSDX_(__NR_freebsd_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn |