|
From: Tom H. <tom...@so...> - 2020-02-20 09:16:29
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3e11902ce28ff43cff679bf2453c597d568fde8f commit 3e11902ce28ff43cff679bf2453c597d568fde8f Author: Tom Hughes <to...@co...> Date: Thu Feb 20 09:14:24 2020 +0000 Allow clone with CLONE_VFORK and no CLONE_VM The CLONE_VFORK flag causes the parent to suspend until the child exits or execs so without the memory sharing CLONE_VM would give this is really closer to fork but we convert vfork to fork by removing CLONE_VM anyway so there is no reason not to allow this. Fixes BZ#417906 Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-linux.c | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 99ece46..07dd914 100644 --- a/NEWS +++ b/NEWS @@ -117,6 +117,7 @@ n-i-bz sys_statx: don't complain if both |filename| and |buf| are NULL. n-i-bz Fix non-glibc build of test suite with s390x_features 416667 gcc10 ppc64le impossible constraint in 'asm' in test_isa. 417452 s390_insn_store_emit: dst->tag for HRcVec128 +417906 clone with CLONE_VFORK and no CLONE_VM fails Release 3.15.0 (12 April 2019) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index bc09628..a4c106f 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -915,6 +915,7 @@ PRE(sys_clone) break; case VKI_CLONE_VFORK | VKI_CLONE_VM: /* vfork */ + case VKI_CLONE_VFORK: /* vfork without memory sharing */ cloneflags &= ~VKI_CLONE_VM; // FALLTHROUGH - assume vfork (somewhat) == fork, see ML_(do_fork_clone). |