New submission from Serhiy Storchaka:

Some time ago Victor proposed in issue16445 a large patch (275 changes) which 
replaces "Py_DECREF(expr); expr = NULL;" to safer "Py_CLEAR(expr);". That patch 
contained was so large because it included cases where expr is just a local 
variable, which are safe in general.

Here are much simpler patches which make replacements only for complex 
expressions.

These patches (as Victor patch) are generated automatically by the Coccinelle 
tool (http://coccinelle.lip6.fr/).

----------
components: Extension Modules, Interpreter Core
files: py_clear.spatch
messages: 209640
nosy: asvetlov, haypo, serhiy.storchaka, skrah
priority: normal
severity: normal
stage: patch review
status: open
title: Use Py_CLEAR to safe clear attributes
type: crash
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33793/py_clear.spatch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20437>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to