Re: Further adventures in the land of 64-bit linux

Anders Qvist <[email protected]> Sat, 14 Sep 2002 14:08:43 +0200
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
On Fri, Sep 13, 2002 at 08:42:03PM -0400, Guido van Rossum wrote:
> I'm cc'ing Martin von Loewis, since I believe he checked in this
> version of grpmodule.c.
> 
> [Anders Qvist]
[snip]
> >   [ 23:18 ] - ./python -u
> >   Python 2.3a0 (#3, Sep 12 2002, 19:11:35) 
> >   [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
> >   Type "help", "copyright", "credits" or "license" for more information.
> >   >>> import grp
> >   >>> g = grp.getgrall()
> >   zsh: segmentation fault  ./python -u

> > If I understand things correctly, this means that the previous line in
> > stringobject.c (110) somehow fails to do its job, or we would have
> > gotten an assert error. Is 0x0 NULL on linux/alpha?
> 
> Yes, NULL is 0x0 even on Linux/Alpha.
> 
> But Python is compiled with -DNDEBUG (unless you request a debug build
> with "configure --with-pydebug") so the assert() is not executed.
> 
> I'm guessing that it's possible that the gr_passwd slot can be NULL on
> that platform; the code doesn't expect this.

With --with-pydebug

  test_glob
  test_global
  test_grp
  python: ../python/dist/src/Objects/stringobject.c:110: PyString_FromString: Assertion `str != ((void *)0)' failed.
  make: *** [test] Avbruten (SIGABRT)

I think we may want pydebug, so I'll turn it on on all hosts.

-- 
Anders "Quest" Qvist

"We've all heard that a million monkeys banging on a million typewriters
will eventually reproduce the entire works of Shakespeare. Now, thanks 
to the Internet, we know this is not true." -- Robert Wilensky