Re: AIX 3.2.4 dbx crashes system! (was: Python 1.0.2 arraymodule.c ... )
Sun, 08 May 1994 13:43:10 +0200

> In trying to debug why arraymodule.c in python dumps core when
> built with AIX xlc but *doesn't* when built with gcc, I tried
> rebuilding it all without -O and with -g, so I could run dbx
> on it.

When switching between gcc and xlc, did you rerun configure and run
"make clean" ???

The errors you get (printing an array object prints nothing
meaningful) remind me of a problem some compilers had before I
introduced some magic regarding "staticforward". On some compilers,
you HAVE to use the static keyword in a forward declaration of a
static structure, else the compiler complains at the second occurrence
that you can't make it static after first making it non-static. This
is ANSI C I believe. But on OTHER compilers, using static on a
forward declaration of a data structure triggers a bug in the compiler
whereby it generates TWO copies of the structure and functions until
the second declaration will SOMETIMES use the first copy instead of
the second. I believe that AIX was one of these compilers.

Now there are two possibilities: (1) you ran configure with gcc and
then later switched to xlc without rerunning it; (2) the check in the
configure script and the corresponding #ifdef BAD_STATIC_FORWARD
in object.h don't quite fix the problem for AIX, ehh, there are THREE
possibilities :-), (1), (2), and (3) there's a missing staticforward
somewhere in arraymodule.c (since it doesn't occur in other modules --
or does it?), oh Biggles, let's leave the room and try again, (4) it's
something totally related, (5) there's another item but I forgot what
it was. (Honestly!)

> 'dbx python' crashes the whole system, big time!

Could be a metter of running out of VM or swap space -- many systems
don't particularly cope with that sort of occurrence very well.
Python compiled with -g has a HUGE symbol table...

--Guido van Rossum, CWI, Amsterdam <>
URL: <>