* Bogus job number
@ 2013-10-29 15:23 Peter Stephenson
2013-10-29 16:23 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 2013-10-29 15:23 UTC (permalink / raw)
To: Zsh Hackers' List
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...
pws
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bogus job number
2013-10-29 15:23 Bogus job number Peter Stephenson
@ 2013-10-29 16:23 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2013-10-29 16:23 UTC (permalink / raw)
To: Zsh Hackers' List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-29 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 15:23 Bogus job number Peter Stephenson
2013-10-29 16:23 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).