[issue6869] Embedded python crashed on 4th run, if "ctypes" is used
mkp
report at bugs.python.org
Sun Sep 13 00:12:03 CEST 2009
mkp <mkpmkpmkp9999 at gmail.com> added the comment:
on python2.5 / mac os x 10.5.7:
$ cat main.c
#include <stdio.h>
#include <python.h>
int main()
{
int i;
for (i=0; i<10; i++)
{
printf("--- %d ---\n", i);
Py_Initialize();
PyRun_SimpleString("import ctypes");
Py_Finalize();
}
return 0;
}
$ gcc -I/usr/include/python2.5/ -L/usr/lib/python2.5/ -lpython main.c
$ ./a.out
--- 0 ---
--- 1 ---
--- 2 ---
--- 3 ---
Assertion failed: (type->tp_flags & Py_TPFLAGS_HEAPTYPE), function
type_dealloc, file Objects/typeobject.c, line 2148.
Abort trap
$ uname -mprsv
Darwin 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009;
root:xnu-1228.12.14~1/RELEASE_I386 i386 i386
----------
nosy: +mkp
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6869>
_______________________________________
More information about the Python-bugs-list
mailing list