Re: Python 1.0.2 arraymodule.c and dbx crashing AIX 3.2.4

Steven D. Majewski (sdm7g@elvis.med.Virginia.EDU)
Sat, 7 May 1994 17:51:37 GMT

Re: dbx crashing system
dbx on my 3.2.5 system claims to be the same version as on my
3.2.4 system, but running it on the same exact executable that
caused the 3.2.4 system to crash did NOT crash on 3.2.5.
[ Maybe the bug is in a sharable library and not in dbx ?
I would still like to know how a non-root user can bring
down the whole AIX system with dbx ! ]

In article <199405061743.AA05094@elvis.med.virginia.edu>,
Steven D. Majewski <sdm7g@elvis.med.virginia.edu> wrote:
>
>I'm trying to track down the problem of why arraymodule doesn't work
>compiled with AIX xlc, but does with gcc.

[ gcc example ... ]

>while compiled with AIX xlc, I get:
>
> >>> array( 'f' )
> < object at 2006f508>
> >>> array( 'f', [1.0,2.0] )
> Illegal instruction(coredump)
>
>also:
> type( a )
>core dumps.
>

But now that I could run dbx on it, I was able to find that
the assignment of
op->ob_type = &Arraytype;
did not have the expected result ( which is why the rather
generic '< object at 2006f508>' appeared. ), and type()
and several other operations tested on a Nil field - the
cause of the core dump.

Arraymodule seemed to be unique in that it is the only object
I noticed that didn't have an Include/*object.h def file
with the structs defined as 'extern'. Arraytype was declared
'staticforward' and 'static' in two declarations IN arraymodule.c
Changing the first of these to 'extern' and removing the second
'static', the module now executes properly when compiled with
AIX xlc.

[ I have it wrapped with #ifdef _AIX currently, but
is there any reason NOT to make this the default ? ]

This and the previous message about dbx have been crossposted
to comp.lang.python and comp.unix.aix. Since the remaining problem
is how dbx managed to crash my system, the followup has been
changed to comp.unix.aix.

-- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU> --
-- UVA Department of Molecular Physiology and Biological Physics --
-- Box 449 Health Science Center Charlottesville,VA 22908 --
[ "Cognitive Science is where Philosophy goes when it dies ...
if it hasn't been good!" - Jerry Fodor ]