From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27454 invoked by alias); 29 Oct 2013 16:23:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31929 Received: (qmail 19143 invoked from network); 29 Oct 2013 16:23:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131029092322.ZM27356@torch.brasslantern.com> Date: Tue, 29 Oct 2013 09:23:21 -0700 In-reply-to: <20131029152305.1d282b58@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Bogus job number" (Oct 29, 3:23pm) References: <20131029152305.1d282b58@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Bogus job number MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 29, 3:23pm, Peter Stephenson wrote: } Subject: Bogus job number } } Reporting for form's sake, though I realise this isn't very useful as it } stands... After suspending and resuming (in the foreground) a } CPU-intensive make, I got } } jobs.c:950: bogus job number, jn = 140813044, jobtab = 140813008, oldjobtab = 0 } [1] + continued make... } } I haven't seen this before, so I guess we've managed to introduce a new } race to make up for all the old ones that have gone... Well, it could just be that the condition tested in DPUTS3() is wrong. This is coming from: 944 if (synch > 1 && oldjobtab != NULL) 945 job = jn - oldjobtab; 946 else 947 job = jn - jobtab; 948 DPUTS3(job < 0 || job > (synch > 1 ? oldmaxjob : maxjob), 949 "bogus job number, jn = %L, jobtab = %L, oldjobtab = %L", 950 (long)jn, (long)jobtab, (long)oldjobtab); And yes, I immediately see a problem with that. diff --git a/Src/jobs.c b/Src/jobs.c index 336c5d4..371b8eb 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -945,7 +945,7 @@ printjob(Job jn, int lng, int synch) job = jn - oldjobtab; else job = jn - jobtab; - DPUTS3(job < 0 || job > (synch > 1 ? oldmaxjob : maxjob), + DPUTS3(job < 0 || job > (oldjobtab && synch > 1 ? oldmaxjob : maxjob), "bogus job number, jn = %L, jobtab = %L, oldjobtab = %L", (long)jn, (long)jobtab, (long)oldjobtab); -- Barton E. Schaefer