[issue19255] Don't "wipe" builtins at shutdown

Christian Heimes report at bugs.python.org
Tue Feb 11 21:39:24 CET 2014


Christian Heimes added the comment:

Your checkin 6a1711c96fa6 caused a Coverity complain:

** CID 1171506:  Unchecked return value  (CHECKED_RETURN)
/Objects/moduleobject.c: 352 in _PyModule_ClearDict()
/Objects/moduleobject.c: 333 in _PyModule_ClearDict()


________________________________________________________________________________________________________
*** CID 1171506:  Unchecked return value  (CHECKED_RETURN)
/Objects/moduleobject.c: 352 in _PyModule_ClearDict()
346                         const char *s = _PyUnicode_AsString(key);
347                         if (s != NULL)
348                             PySys_WriteStderr("#   clear[2] %s\n", s);
349                         else
350                             PyErr_Clear();
351                     }
>>>     CID 1171506:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "PyDict_SetItem(d, key, &_Py_NoneStruct)".
352                     PyDict_SetItem(d, key, Py_None);
353                 }
354             }
355         }
356     
357         /* Note: we leave __builtins__ in place, so that destructors
/Objects/moduleobject.c: 333 in _PyModule_ClearDict()
327                         const char *s = _PyUnicode_AsString(key);
328                         if (s != NULL)
329                             PySys_WriteStderr("#   clear[1] %s\n", s);
330                         else
331                             PyErr_Clear();
332                     }
>>>     CID 1171506:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "PyDict_SetItem(d, key, &_Py_NoneStruct)".
333                     PyDict_SetItem(d, key, Py_None);
334                 }
335             }
336         }
337     
338         /* Next, clear all names except for __builtins__ */

----------
nosy: +christian.heimes

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


More information about the Python-bugs-list mailing list