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

Mark Wielaard <m...@klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m...@klomp.org

--- Comment #3 from Mark Wielaard <m...@klomp.org> ---
This glibc commit seems to have broken how valgrind handles posix_spawn.
It now relies on CLONE_VM semantics.

commit 4b4d4056bb154603f36c6f8845757c1012758158
Author: Rasmus Villemoes <r...@rasmusvillemoes.dk>
Date:   Tue Sep 27 17:52:17 2016 -0700

    linux: spawni.c: simplify error reporting to parent

    Using CLONE_VFORK already ensures that the parent does not run until the
    child has either exec'ed succesfully or called _exit. Hence we don't
    need to read from a CLOEXEC pipe to ensure proper synchronization - we
    just make explicit use of the fact the the child and parent run in the
    same VM, so the child can write an error code to a field of the
    posix_spawn_args struct instead of sending it through a pipe.

    To ensure that this mechanism really works, the parent initializes the
    field to -1 and the child writes 0 before execing.

    This eliminates some annoying bookkeeping that is necessary to avoid
    the file actions from clobbering the write end of the pipe, and
    getting rid of the pipe creation in the first place means fewer system
    calls (four in the parent, usually one in the child) and fewer
    chanches for the spawn to fail (e.g. if we're close to EMFILE).

    Checked on x86_64 and i686.

        * sysdeps/unix/sysv/linux/spawni.c (posix_spawn_args): Remove pipe
        field, add err field.
        (__spawni_child): Report error through err member instead of pipe.
        (__spawnix): Likewise.

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

Reply via email to