Version: 3.5.0 (using KDE 4.4.3) OS: Linux When using a program calling the fcntl command F_DUPFD_CLOEXEC, valgrind will stop with the following trace: valgrind: m_syswrap/syswrap-linux.c:3536 (vgSysWrap_linux_sys_fcntl_before): Assertion 'Unimplemented functionality' failed. valgrind: valgrind ==5198== at 0x3802A9A4: report_and_quit (m_libcassert.c:145) ==5198== by 0x3802AC17: vgPlain_assert_fail (m_libcassert.c:217) ==5198== by 0x38076E33: vgSysWrap_linux_sys_fcntl_before (syswrap-linux.c:3536) ==5198== by 0x38065651: vgPlain_client_syscall (syswrap-main.c:1392) ==5198== by 0x3806225D: handle_syscall (scheduler.c:873) ==5198== by 0x380630B9: vgPlain_scheduler (scheduler.c:1069) ==5198== by 0x3808C1C4: run_a_thread_NORETURN (syswrap-linux.c:91) DBus 1.3 does for example use that functionality to pass UNIX file descriptors between programs. Reproducible: Always Steps to Reproduce: Valgrind a program that uses F_DUPFD_CLOEXEC Actual Results: Valgrind stops Expected Results: Valgrind should valgrind, as it always valgrin'ed
Could you please supply a short program that shows the failure?
Here is a very simple code: #include <fcntl.h> #include <unistd.h> int main (int argc, char **argv) { int pipefd[2]; int dupped_pipe; pipe (pipefd); dupped_pipe = fcntl (pipefd[0], F_DUPFD_CLOEXEC, 3); close (pipefd[0]); close (pipefd[1]); close (dupped_pipe); }
Would that be something difficult to implement? I might take a try at it, but not if it involves one month of learning Valgrind's codebase :)
Tom, any chance you can look into this one?
Fixed in r11316.