[issue3537] dict creation failure causes crash
Georg Brandl
report at bugs.python.org
Sun Aug 10 20:47:25 CEST 2008
Georg Brandl <georg at python.org> added the comment:
The problem is that PyDict_New doesn't reinitialize the fields of a dict
from the free list when the number of entries is zero. For a
preconstructed dict (like created by BUILD_MAP) of size >=8, however,
there will be an allocated ma_table and ma_mask will be 16-1, not 8-1.
I propose the attached patch.
----------
keywords: +patch
Added file: http://bugs.python.org/file11095/dictobj.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3537>
_______________________________________
More information about the Python-bugs-list
mailing list