https://bugs.kde.org/show_bug.cgi?id=417906

--- Comment #4 from Tom Hughes <t...@compton.nu> ---
The problem is not CLONE_PIDFD at all, it's the use of CLONE_VFORK without
CLONE_VM. It fails in the same way if you remove CLONE_PIDFD:

==171682== Memcheck, a memory error detector
==171682== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==171682== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==171682== Command: ./clone
==171682== 
==171682== Unsupported clone() flags: 0x4000
==171682== 
==171682== The only supported clone() uses are:
==171682==  - via a threads library (LinuxThreads or NPTL)
==171682==  - via the implementation of fork or vfork
==171682== 
==171682== Valgrind detected that your program requires
==171682== the following unimplemented functionality:
==171682==    Valgrind does not support general clone().
==171682== This may be because the functionality is hard to implement,
==171682== or because no reasonable program would behave this way,
==171682== or because nobody has yet needed it.  In any case, let us know at
==171682== www.valgrind.org and/or try to work around the problem, if you can.
==171682== 
==171682== Valgrind has to exit now.  Sorry.  Bye!
==171682== 

We only support three basic modes of operation, defined by the values of the
following flags:

* CLONE_VM
* CLONE_FS
* CLONE_FILES
* CLONE_VFORK

Those modes are:

* thread creation (CLONE_VM, CLONE_FS and CLONE_FILES set)
* traditional vfork (CLONE_VFORK and CLONE_VM set)
* traditional fork (none of the above set)

We generally allow any combination of other flags however, it's just those four
that are required to choose which general mode of operation we are dealing
with.

Setting CLONE_VFORK on it's own has the effect of causing the parent to be
suspended until the child exits or execs but without the shared address space
that vfork would normally have. That makes it closer to fork than vfork really
and in any case valgrind transforms vfork to fork by removing the CLONE_VM flag
so I see no reason not to allow this combination.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to