[Python-Dev] collections module
Tim Peters
tim.one at comcast.net
Tue Jan 13 15:30:13 EST 2004
[Jeff Epler]
> To repeat findings on a Linux machine (redhat9, x86, 2.4GHz):
> Old New
> 0.74 0.22
> 0.74 0.22
> 0.74 0.22
> 0.74 0.22
> 0.72 0.21
> 0.76 0.22
> 0.74 0.22
> 0.77 0.22
> 0.75 0.22
> 0.74 0.22
>
> I also got the same (?) failure as tim described:
> test_list
> make: *** [test] Segmentation fault
Yup, that's the one. This line in listsort():
self->ob_item = empty_ob_item = PyMem_NEW(PyObject *, 0);
violates the new assumption too; it can be replaced with, e.g.,
self->ob_item = empty_ob_item = PyMem_NEW(PyObject *,
roundupsize(0) * sizeof(PyObject*));
although that should really be checked for a NULL return too.
More information about the Python-Dev
mailing list