464859 Build failures with GCC-13 (drd tsan_unittest)
464969 D language demangling
465435 m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed.
+n-i-bz FreeBSD rfork syscall fail with EINVAL or EINVAL rather than VG_(unimplemented)
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
PRE(sys_rfork)
{
PRINT("sys_rfork ( %#" FMT_REGWORD "x )", ARG1 );
- PRE_REG_READ1(long, "rfork", int, flags);
+ PRE_REG_READ1(pid_t, "rfork", int, flags);
- VG_(message)(Vg_UserMsg, "rfork() not implemented");
- VG_(unimplemented)("Valgrind does not support rfork().");
+ VG_(message)(Vg_UserMsg, "warning: rfork() not implemented\n");
- SET_STATUS_Failure(VKI_ENOSYS);
+ if ((UInt)ARG1 == VKI_RFSPAWN) {
+ // posix_spawn uses RFSPAWN and it will fall back to vfork
+ // if it sees EINVAL
+ SET_STATUS_Failure(VKI_EINVAL);
+ } else {
+ SET_STATUS_Failure(VKI_ENOSYS);
+ }
}
// SYS_preadv 289
*flags |= SfYieldAfter;
}
#else
- VG_(message)(Vg_UserMsg, "rfork() not implemented");
- VG_(unimplemented)("Valgrind does not support rfork() yet.");
- SET_STATUS_Failure( VKI_ENOSYS );
+ VG_(message)(Vg_UserMsg, "rfork() not implemented\n");
+ if ((UInt)ARG1 == VKI_RFSPAWN) {
+ // posix_spawn uses RFSPAWN and it will fall back to vfork
+ // if it sees EINVAL
+ SET_STATUS_Failure(VKI_EINVAL);
+ } else {
+ SET_STATUS_Failure(VKI_ENOSYS);
+ }
#endif
}
#define VKI_W_OK 0x02 /* test for write permission */
#define VKI_R_OK 0x04 /* test for read permission */
+#define VKI_RFSPAWN (1U<<31U)
+
+
//----------------------------------------------------------------------
// From sys/msg.h
//----------------------------------------------------------------------
usrstack.stderr.exp \
usrstack.stdout.exp \
proc_pid_file.vgtest \
- proc_pid_file.stderr.exp
+ proc_pid_file.stderr.exp \
+ bash_test.vgtest \
+ bash_test.sh \
+ bash_test.stderr.exp \
+ bash_test.stdout.exp \
+ csh_test.vgtest \
+ csh_test.csh \
+ csh_test.stderr.exp \
+ csh_test.stdout.exp \
+ ksh_test.vgtest \
+ ksh_test.ksh \
+ ksh_test.stderr.exp \
+ ksh_test.stdout.exp
check_PROGRAMS = \
auxv osrel swapcontext hello_world fexecve 452275 usrstack \
--- /dev/null
+#!/usr/local/bin/bash
+echo Bash Hello, World!
--- /dev/null
+Bash Hello, World!
--- /dev/null
+# bash isn't part of base
+prereq: test -e /usr/local/bin/bash
+prog: bash_test.sh
+vgopts: -q
--- /dev/null
+#!/bin/csh
+echo Csh Hello, World!
--- /dev/null
+Csh Hello, World!
--- /dev/null
+prog: csh_test.csh
+vgopts: -q
--- /dev/null
+#!/usr/local/bin/ksh93
+print Ksh Hello, World!
--- /dev/null
+Ksh Hello, World!
--- /dev/null
+# ksh isn't part of base
+prereq: test -e /usr/local/bin/ksh93
+prog: ksh_test.ksh
+vgopts: -q