[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS misc/pwd bug on Solaris 9
From: |
Albert Chin |
Subject: |
CVS misc/pwd bug on Solaris 9 |
Date: |
Wed, 16 Jun 2004 17:05:48 -0500 |
User-agent: |
Mutt/1.5.6i |
Oddly, misc/pwd from CVS fails on Solaris 9 but works on Solaris
2.5.1-8:
$ PATH=/opt/TWWfsw/perl582/bin:$PATH VERBOSE=yes gmake check TESTS=pwd
gmake check-TESTS
gmake[1]: Entering directory `/opt/build/coreutils-5.3.0/tests/misc'
/opt/build/coreutils-5.3.0/tests/misc/../../src/pwd: memory exhausted
pwd: /opt/build/coreutils-5.3.0/tests/misc/pwd.tmp/3587/zzzzzz...
...
FAIL: pwd
The "zzzz" continues ad infinitum. I have the latest kernel and libc
patch. I used the same compiler and compiler options on both Solaris 8
and 9 yet 9 crashes and 8 does not. I modified lib/xgetcwd.c from:
while (1)
{
char *buf = xmalloc (buf_size);
char *cwd = getcwd (buf, buf_size);
int saved_errno;
if (cwd)
return cwd;
to:
while (1)
{
char *buf = xmalloc (buf_size);
char *cwd = getcwd (buf, buf_size);
int saved_errno;
printf("buf_size: %lu\n", buf_size);
printf("cwd: %lx\n", cwd);
if (cwd)
return cwd;
and saw the following on Solaris 8:
$ cd tests/misc
$ VERBOSE=yes gmake check TESTS=pwd
...
pwd: /opt/build/coreutils-5.3.0/tests/misc/pwd.tmp/1870/zzzzz...
buf_size: 128
cwd: 0
buf_size: 256
cwd: 0
buf_size: 512
cwd: 0
buf_size: 1024
cwd: 0
buf_size: 2048
cwd: 0
buf_size: 4096
cwd: 0
buf_size: 8192
cwd: 0
buf_size: 16384
cwd: 28930
and on Solaris 9:
$ cd tests/misc
$ VERBOSE=yes gmake check TESTS=pwd
pwd: /opt/build/coreutils-5.3.0/tests/misc/pwd.tmp/1870/zzzzz...
...
buf_size: 128
cwd: 0
buf_size: 256
cwd: 0
buf_size: 512
cwd: 0
buf_size: 1024
cwd: 0
buf_size: 2048
cwd: 0
buf_size: 4096
cwd: 0
buf_size: 8192
cwd: 0
buf_size: 16384
cwd: 0
buf_size: 32768
cwd: 0
buf_size: 65536
cwd: 0
..
Is this a Solaris 9 getcwd() bug?
--
albert chin (address@hidden)
- CVS misc/pwd bug on Solaris 9,
Albert Chin <=