[issue9675] segfault: PyDict_SetItem: Assertion `value' failed.

Florent Xicluna report at bugs.python.org
Wed Aug 25 03:03:38 CEST 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

The crash is triggered because PyDict_SetItemString(d, "api", py_api) is called with py_api=NULL when PyCObject_FromVoidPtr returns an error.

A possible workaround is to create a copy of PyCObject_FromVoidPtr (e.g. _PyCObject_FromVoidPtr) which is free of warnings.
This function will be used by the _bsddb module in Python 2.7.

See patch.

----------
keywords: +patch
stage: unit test needed -> patch review
Added file: http://bugs.python.org/file18637/issue9675_cobject.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9675>
_______________________________________


More information about the Python-bugs-list mailing list