mdv@comtst.UUCP (Mike Verstegen) (10/20/90)
Recently I posted a article describing a problem after building the recent
perl 3.0 PL 36. I have tracked down the problem to a bug in util.c
We are running a 3B2/600 with plain vanilla System V.3.1 which does not provide
wait4 or waitpid. In the module wait4pid, several #ifdefs provide calls to
wait4 or waitpid if they exist. Since we have neither, the code falls through
to the following:
wait4pid(pid,statusp,flags)
int pid;
int *statusp;
int flags;
{
int result;
STR *str;
char spid[16];
[...]
if (pid > 0) {
sprintf(spid, "%d", pid);
str = hfetch(pidstatus,spid,strlen(pid),FALSE);
^^^
Note that this is taking the strlen of the int pid, instead of the string spid.
Here is the diff for the change
1344c1344
< str = hfetch(pidstatus,spid,strlen(pid),FALSE);
---
> str = hfetch(pidstatus,spid,strlen(spid),FALSE);
After this patch, testing completed with only two other failures:
op.exec.........FAILED on test 4
op.stat.........FAILED on test 40
I'm still chasing these, but at least I can run tests without core dumps.
Hope this helps somebody else out there to avoid chasing this problem.
Mike
--
Mike Verstegen Domain Systems, Inc Voice +1 407 686-7911
..!uunet!comtst!mdv 5840 Corporate Way #100 Fax +1 407 478-2542
mdv@domain.com West Palm Beach, FL 33407
--
Mike Verstegen Domain Systems, Inc Voice +1 407 686-7911
..!uunet!comtst!mdv 5840 Corporate Way #100 Fax +1 407 478-2542
mdv@domain.com West Palm Beach, FL 33407