On 4/9/06, Tim Peters <[EMAIL PROTECTED]> wrote: > [Guido] > > On Linux, In HEAD 2.5, but only with the non-debug version, I get a > > segfault when I do this: > > > > >>> ''' > > ... ''' > > It rings a bell here only in that the front end had lots of > allocate-versus-free mismatches between the PyObject_ and PyMem_ > raw-memory APIs, and this kind of failure smells a lot like that.
http://python.org/sf/1467512 fixes the problem for me on linux. It converts all the PyMem_* APIs to PyObject_* APIs. Assigned to Guido until he changes that. :-) There are several more places in the core that should probably use PyObject_* memory APIs since the alloced memory is small. 412 uses of PyMem_* in */*.c. Most of those are in modules where it is probably appropriate. But PyFutureFeatures could really use PyObject_* given it's only 8 bytes. (Python/future.c and Python/compile.c). Modules/_bsddb.c has a scary line: #define PyObject_Del PyMem_DEL n _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com