https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113991

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually it seems like a glibc bug to me, though what vsftpd is totally weird.
Seems glibc clone on all arches always errors when the first or second argument
is NULL and that is exactly what
vsf_sysutil_fork_isolate_failok and vsf_sysutil_fork_newnet do:
    int ret = clone(NULL, NULL, CLONE_NEWPID | CLONE_NEWIPC | SIGCHLD, NULL);
    int ret = clone(NULL, NULL, CLONE_NEWNET | SIGCHLD, NULL);
so I have no idea who added this stuff to vsftpd and why when it couldn't ever
work.
Or does it work say on musl?
Anyway, the glibc bug is that both s390x and s390 clone in that failure case
clobbers %r7:
        stmg    %r6,%r7,48(%r15)        /* Save registers.  */
        cfi_offset (%r7,-104)
        cfi_offset (%r6,-112)
        ltgr    %r7,%r2                 /* check fn and move to %r7 */
        jz      error                   /* no NULL function pointers */
        lghi    %r0,-16                 /* Align the child_stack to a ...  */
        ngr     %r3,%r0                 /* double word boundary and ...  */
        jz      error                   /* avoid NULL stack pointers.  */
...
error:
        lghi    %r2,-EINVAL
        jg      SYSCALL_ERROR_LABEL
Guess error: label should either lmg     %r6,%r7,48(%r15) or lg %r7,56(%r15)

Reply via email to