[issue23998] PyImport_ReInitLock() doesn't check for allocation error

2015-04-20 Thread Christian Heimes

Christian Heimes added the comment:

Thanks, Brett!

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23998
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23998] PyImport_ReInitLock() doesn't check for allocation error

2015-04-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d70995cf44b3 by Christian Heimes in branch '2.7':
Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
https://hg.python.org/cpython/rev/d70995cf44b3

New changeset 7d7bf5c34d7e by Christian Heimes in branch '3.3':
Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
https://hg.python.org/cpython/rev/7d7bf5c34d7e

New changeset e0bd083fc9c1 by Christian Heimes in branch '3.4':
Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
https://hg.python.org/cpython/rev/e0bd083fc9c1

New changeset 7ae8fd62d743 by Christian Heimes in branch 'default':
Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
https://hg.python.org/cpython/rev/7ae8fd62d743

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23998
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23998] PyImport_ReInitLock() doesn't check for allocation error

2015-04-19 Thread Brett Cannon

Brett Cannon added the comment:

LGTM

--
assignee:  - christian.heimes
nosy: +brett.cannon
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23998
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23998] PyImport_ReInitLock() doesn't check for allocation error

2015-04-18 Thread Christian Heimes

New submission from Christian Heimes:

_PyImport_ReInitLock() doesn't check the return value of 
PyThread_allocate_lock(). A failed lock allocation can either lead to a NULL 
pointer dereference or to race conditions caused by a missing import lock.

As there is no way to recover from a failed lock allication I recommend to 
abort with a fatal error.

CID 1295025 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer import_lock to PyThread_acquire_lock, 
which dereferences it.

--
files: import_reinit_fatal.patch
keywords: buildbot, easy, patch
messages: 241462
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: PyImport_ReInitLock() doesn't check for allocation error
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file39110/import_reinit_fatal.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23998
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com