[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AIX tests failures
From: |
Ralf Wildenhues |
Subject: |
Re: AIX tests failures |
Date: |
Sun, 28 May 2006 17:52:45 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Hi Jim,
* Jim Meyering wrote on Sun, May 28, 2006 at 03:48:21PM CEST:
> Ralf Wildenhues <address@hidden> wrote:
>
> > With coreutils 5.96, I get three failures on AIX 4.3.3, namely:
> > cp/fail-perm, rm/inaccessible, help-version.
> > $ env VERBOSE=yes TESTS=help-version make check-TESTS
> > [...]
> > + 0< in-2578 1> out-2578
> > ../../src/dircolors: <internal>:54: unrecognized keyword
> > OTHER_WRITABLERITABLE
> > + echo FAIL: dircolors
> > FAIL: dircolors
>
> Odd, indeed.
> Does the generated file, dircolors.h, look alright?
Well, it was still the one shipped with the 5.96 tarball.
If I remove coreutils-5.96/src/dircolors.h, then the regenerated one in
the build tree has white-space difference from the removed one. A
`dircolors' program rebuilt with that headers gives the same error.
> If yours looks the same, then that failure may be due to compiler
> limitations. The string defined in that file is pretty long.
> Which compiler are you using?
/usr/vac/bin/cc aka "C for AIX Compiler, Version 6". But I don't think
this is the source for the error. Tried rebuilding it with gcc-3.4.3
(in the same build tree, yes I know this is unreliable), and get the
same error...
(time passes)
... AIX strndup is severely broken, at least on 4.3.3 and 5.1, similar
to its strnlen; see also[1]. See for example this test:
$ cat >a.c <<\EOF
#include <stdio.h>
#include <stdlib.h>
extern char *strndup (const char *, size_t);
int main()
{
char *s = strndup ("STICKY_OTHER_WRITABLEx", 21);
printf ("%s.\n", s);
free (s);
printf ("%s.\n", strndup("OTHER_WRITABLE 3", 14));
}
EOF
$ cc -o a a.c && ./a
STICKY_OTHER_WRITABLE.
OTHER_WRITABLERITABLE.
And yes, that happens with GCC as well. They simply forget the final
`\0', I guess. As also mentioned here[2], the strndup declaration is
#ifdef'ed away behind a _LINUX_SOURCE_COMPAT define.
I guess Autoconf should have a AC_FUNC_STRNLEN analogous to
AC_FUNC_STRNLEN, and the Gnulib strnlen modules should use that.
I don't know whether other buggy strn* functions exist on AIX.
cut.c, dircolors.c, expand.c, and unexpand.c also use strndup.
Cheers,
Ralf
[1] https://bugzilla.samba.org/show_bug.cgi?id=1097
[2] http://mailman.webdav.org/pipermail/cadaver/2004-April/000759.html
Re: AIX tests failures, Jim Meyering, 2006/05/28
Re: AIX tests failures, Jim Meyering, 2006/05/28
- Re: AIX tests failures,
Ralf Wildenhues <=
- Re: AIX tests failures, Jim Meyering, 2006/05/28
- Re: AIX tests failures, Paul Eggert, 2006/05/28
- Re: AIX tests failures, Ralf Wildenhues, 2006/05/28
- Re: AIX tests failures, Paul Eggert, 2006/05/29
- Re: [bug-gnulib] Re: AIX tests failures, Bruno Haible, 2006/05/30
- Re: [bug-gnulib] Re: AIX tests failures, Ralf Wildenhues, 2006/05/30
- Re: [bug-gnulib] AIX tests failures, Bruno Haible, 2006/05/30
- Re: [bug-gnulib] AIX tests failures, Ralf Wildenhues, 2006/05/30
- Re: [bug-gnulib] AIX tests failures, Bruno Haible, 2006/05/30
- Re: [bug-gnulib] AIX tests failures, Albert Chin, 2006/05/30