[New-bugs-announce] [issue22735] Fix various crashes exposed through mro() customization

Eldar Abusalimov report at bugs.python.org
Sun Oct 26 22:06:21 CET 2014


New submission from Eldar Abusalimov:

The attached patch fixes several bugs revealed by providing a custom mro(). Most of these bugs are reentrancy issues (mainly, cls.__bases__ assignment within mro() which causes incorrect refcounting), but there are also some issues when using incomplete types with uninitialized MRO (dereferencing NULL when extending such types, attribute lookup on super, etc.). The patch is made against the default branch (py3k), however all these bugs exist in Python 2 as well.

I also tried to break the patch into smaller pieces (commits, in fact) to ease reviewing: a common pattern is test->minor->fix series. The patch set is an output of `git format-patch`, and most patches have a detailed commit message describing a change inside.

Adding memory mgmt and object model guys to nosy list.

----------
components: Interpreter Core
files: mro-crashers-fix-v1.diff
keywords: patch
messages: 230044
nosy: abusalimov, benjamin.peterson, lemburg, tim.peters
priority: normal
severity: normal
status: open
title: Fix various crashes exposed through mro() customization
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37025/mro-crashers-fix-v1.diff

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


More information about the New-bugs-announce mailing list