From patchwork Sat Nov 15 01:29:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricky Zhou X-Patchwork-Id: 3757 Received: (qmail 21067 invoked by alias); 15 Nov 2014 01:29:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 21052 invoked by uid 89); 15 Nov 2014 01:29:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ob0-f202.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dpm3r4d4NfaUcqqma8ahsXCZC8ufGbQ8YUhVyqQy5Wo=; b=cAlVDa8PgzPNZDHFmxdTrgjJr8OkrOcdVZFcauPmhKrn3rNrSvVPodCL6rDHOGozBn R3dZwXNuNoDybfj5rgPkY7fo2FYO7JIMSWOYMku7hPDak4Or4U5RiUjYI7rTX6gj1OFF dHM5nQOhruaJH7U8BGlR9iKFKg05/uVKESc+bkWO9k6n3crip2OopB/IS9xGUfLlauR0 lemGrU2iE97Uvndffh0aVMyq3m2hr7BvUvv4MwdS52WAYxBX7reYUZPBEPh5HaAMy2lB Pi/v1EwUYELAhTSFJnnWIVQLlGMfWoOmRwjfwkQYmNofoVi8wbsxijws+vMcG/045rl9 0FTQ== X-Gm-Message-State: ALoCoQkkNz5ITpMtXVTT1mWf7z3OXT7JW36g0+2GjGlTZQyvSRjf3igWnn5ufvAPw6NfzDej52WV X-Received: by 10.50.128.226 with SMTP id nr2mr9334084igb.2.1416014957138; Fri, 14 Nov 2014 17:29:17 -0800 (PST) From: Ricky Zhou To: libc-alpha@sourceware.org Cc: Ricky Zhou Subject: [PATCH] [BZ #15392] Remove fork child pid assertion Date: Fri, 14 Nov 2014 17:29:15 -0800 Message-Id: <1416014955-5408-1-git-send-email-rickyz@chromium.org> This assertion is no longer always true, since a forked child may be in a different PID namespace than its parent, and the two namespace may have PID collisions. An example program which hits this assert is attached to bug 17596. [BZ #15392] * sysdeps/nptl/fork.c (__libc_fork): Remove assert that the parent and child pid must differ after forking. --- sysdeps/nptl/fork.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c index a7dafa8..6adb723 100644 --- a/sysdeps/nptl/fork.c +++ b/sysdeps/nptl/fork.c @@ -139,8 +139,6 @@ __libc_fork (void) { struct pthread *self = THREAD_SELF; - assert (THREAD_GETMEM (self, tid) != ppid); - /* See __pthread_once. */ if (__fork_generation_pointer != NULL) *__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR;