[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: commit review -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed. -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset e6d1328412c8 by Mark Dickinson in branch '3.3': Issue #16447: Fix potential segfault when setting __name__ on a class. http://hg.python.org/cpython/rev/e6d1328412c8 New changeset c8d771f10022 by Mark Dickinson in branch 'default': Issue #16447: Merg

[issue16447] SEGFAULT when setting type.__name__

2013-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5e5017309b1 by Mark Dickinson in branch '2.7': Issue #16447: Fix potential segfault when setting __name__ on a class. http://hg.python.org/cpython/rev/d5e5017309b1 -- nosy: +python-dev ___ Python tracker

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: needs patch -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: And the corresponding patch against 3.2 (applies cleanly to 3.3 and default, modulo Misc/NEWS fixes). -- Added file: http://bugs.python.org/file29299/issue16447_32.patch ___ Python tracker

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: Patch for the immediate issue, for Python 2.7. The Py_DECREF is delayed until after setting *both* ht_name and tp_name. -- Added file: http://bugs.python.org/file29298/issue16447_27.patch ___ Python tracker

[issue16447] SEGFAULT when setting type.__name__

2013-02-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue16447] SEGFAULT when setting type.__name__

2013-01-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue16447] SEGFAULT when setting type.__name__

2012-12-14 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16447] SEGFAULT when setting type.__name__

2012-12-10 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16447] SEGFAULT when setting type.__name__

2012-11-15 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16447] SEGFAULT when setting type.__name__

2012-11-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Yes, we should add a "Py_REPLACE()" macro. Sure. +1 to that. With this issue in mind, I wonder if there is any situation where "Py_DECREF/Py_XDECREF" must be used that can not be replace with "Py_CLEAR/Py_REPLACE". Is there any code that breaks if we replace

[issue16447] SEGFAULT when setting type.__name__

2012-11-09 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16447] SEGFAULT when setting type.__name__

2012-11-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - For the replacement with NULL, Py_CLEAR() should be used instead. - We should use a macro (Py_REF_ASSIGN?) for the replacement case. - Careful, in Modules/_json.c the code is wrong because tmp is already used:: PyObject *tmp = PyUnicode_AsEncod

[issue16447] SEGFAULT when setting type.__name__

2012-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the macro appropriate here. In Modules/zlibmodule.c this patterns should be fixed by patch for issue16350. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue16447] SEGFAULT when setting type.__name__

2012-11-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Extension Modules, Interpreter Core stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue16447] SEGFAULT when setting type.__name__

2012-11-08 Thread STINNER Victor
STINNER Victor added the comment: We should maybe use a macro (ex: Py_DECREC_REPLACE) instead of copying the pattern "{ PyObject *tmp = obj->attr; obj->attr = new_value; Py_DECREF(tmp); }". -- ___ Python tracker _

[issue16447] SEGFAULT when setting type.__name__

2012-11-08 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file27932/python27_decref_replace.patch ___ Python tracker ___

[issue16447] SEGFAULT when setting type.__name__

2012-11-08 Thread STINNER Victor
STINNER Victor added the comment: It looks like the bug is the pattern "Py_DECREF(obj->attr); obj->attr = new_value;". Replacing it with "{ PyObject *tmp = obj->attr; obj->attr = new_value; Py_DECREF(tmp); }" does fix this specific issue. We can use the coccinelle tool to replace all such patt

[issue16447] SEGFAULT when setting type.__name__

2012-11-08 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: Following script crashes all versions of Python. Cause is the "Py_DECREF(et->ht_name)" in type_set_name(). class Nasty(str): def __del__(self): C.__name__ = "other" class C(object): pass C.__name__ = Nasty("abc") C.__name__ = "normal"