[egenix-users] seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5

Ross Brattain ross at principia.edu
Fri Feb 6 16:16:58 CET 2004


"M.-A. Lemburg" <mal at egenix.com> writes:

> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
> 

No, just vanilla ./configure.

I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.

Because of this line from the backtrace:
#0  mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333

mxDateTime.c:333 :

#ifdef MXDATETIME_FREELIST
    if (mxDateTime_FreeList) {
	datetime = mxDateTime_FreeList;
	mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
	datetime->ob_type = &mxDateTime_Type;
->	_Py_NewReference(datetime);
    }
    else
#endif 
	 {
	datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
	if (datetime == NULL)
	    return NULL;
    }

I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.

--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c    2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c        2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
 #define STRFTIME_OUTPUT_SIZE   1024
 
 /* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
 #define MXDATETIMEDELTA_FREELIST
 
 /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */


This is not the root cause because, as mentioned, a rebuild of 
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.

My working production environment (different machine) is:
Python 2.2.3 (#1, Jun  5 2003, 13:06:29) 
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2

and egenix-base-2.0.4

I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.

So is it a gcc problem?

-Ross B.


More information about the egenix-users mailing list