[Python-Dev] Re: test_getargs2 failures (was: vacation)
Thomas Heller
theller@python.net
23 Apr 2003 20:08:47 +0200
Neal Norwitz <neal@metaslash.com> writes:
> On Wed, Apr 23, 2003 at 07:48:06PM +0200, Thomas Heller wrote:
> > Neal Norwitz <neal@metaslash.com> writes:
> >
> > > Some test failures are:
> > >
> > > test_getargs2 Solaris 8, Mac OS X
> >
> > It seems test_getargs2 fails on big endian platforms. Is the solaris 8
> > such a machine?
>
> I believe so.
>
> > See also the comments I added to http://www.python.org/sf/724774.
> >
> > I have the impression that the test is broken. Should I try to fix it
> > (difficult, without access to neither Mac or Solaris), or should it
> > simply be deleted ;-)
>
> I think getargs_ul() is broken.
That was what I meant.
> For example, if the user passes more
> than a single char as the format, memory will be scribbled on. The
> format should be checked to make sure it contains acceptable values
> for getargs_ul() to be safe.
It is even broken if only single character formats are passed, because
it always uses an unsigned long * as the third parameter, which is wrong
for 'B' and 'H' format codes.
>
> I fixed a similar problem in revision 1.23 of _testcapimodule.c.
> See comment and code around line 330.
I will take a look.
>
> I'm not really sure of the purpose of _testcapimodule, so perhaps
> the lack of error checking is acceptable? I can fix the problems,
> but not before the beta will go out.
>
> Neal
Thomas