Import of strop module in C program with Python2.2 on AIX4.3.3 issues a segmentation fault
Olivier Cipière
ocipiere at club-internet.fr
Wed Mar 13 15:44:06 EST 2002
Hi all,
Here is a problem I encounter with Python 2.2 on AIX 4.3.3 :
The import of strop module or strop dependants modules
in a C program issues a segmentation
fault, even though it seems to work alright when performing
import from the python prompt.
Does anybody have already encountered this problem or have a solution ??
Best regards,
Olivier Cipière.
Below is the simple test program we use :
PYTHONPATH=/tools/python2.2.debug/lib/python2.2:/tools/python2.2.debug/lib/python2.2/lib-tk:/tools/xmlproc0.70:/tools/doctemplate2.2.1:/tools/python2.2.debug/lib/python2.2/plat-aix4:/tools/python2.2.debug/lib/python2.2/lib-dynload:/tools/python2.2.debug/lib/python2.2/site-packages
test program :
-------------------
#include <iostream.h>
#include <Python.h>
int main(int i__argc,char* i__argv[])
{
Py_Initialize();
cout << endl << "CALL of PyImport_ImportModule with argument "
<< getenv("NAME_MODULE")
<< endl;
PyObject * l__obj =
PyImport_ImportModule(getenv("NAME_MODULE"));
if (l__obj == NULL)
cout << "importation of module " << getenv("NAME_MODULE") << "
failed !" << endl;
return 1;
}
We ran this test program for different values of $NAME_MODULE.
$NAME_MODULE | result?
-------------------------------------------------------------
base64 | KO (Segmentation fault) at the call of
PyImport_ImportModule
os | OK
strop | KO (Segmentation fault) at the call of
PyImport_ImportModule
string | KO (Segmentation fault) at the call of
PyImport_ImportModule
What do we see with dbx (Python 2.2 is compiled in debug mode)?
-------------------------------------
The last instructions in the stack are :
stropmodule.split_whitespace(s = "strop", len = 806723600, maxsplit =
806727672), line 80 in
"stropmodule.c"
initstrop(), line 1221 in "stropmodule.c"
_PyImport_LoadDynamicModule(0x2ff1d2b0, 0x2ff1cdc0, 0xf0004d40), line 53
in "importdl.c"
with 0x2ff1d2b0 = "strop"
0x2ff1cdc0 =
"/tools/python2.2.debug/lib/python2.2/lib-dynload/strop.so"
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
More information about the Python-list
mailing list