[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

The chances of this being a problem is REALLY small and the single function 
that calls this is a public void function so there is no way for an exception 
to propagate short of a fatal error which seems a bit much.

I did change to using NOWAIT_LOCK, though.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-11-12 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
nosy: +eric.snow

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



[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-09-09 Thread Christian Heimes

New submission from Christian Heimes:

Coverity claims that the call to PyThread_acquire_lock with NOWAIT_LOCK can 
fail. It sounds plausible as you don't wait for the lock to succeed.

CID 486861: Unchecked return value (CHECKED_RETURN)At (3): Calling function 
PyThread_acquire_lock(PyThread_type_lock, int) without checking return value 
(as is done elsewhere 22 out of 23 times).
At (9): No check of the return value of PyThread_acquire_lock(import_lock, 0).
 205PyThread_acquire_lock(import_lock, 0);
 206/* XXX: can the previous line fail? */

By the way the code would be more readable with NOWAIT_LOCK instead of 0.

--
assignee: brett.cannon
components: Interpreter Core
messages: 170141
nosy: brett.cannon, christian.heimes
priority: normal
severity: normal
status: open
title: _PyImport_ReInitLock() doesn't check return value of 
PyThread_acquire_lock
type: behavior
versions: Python 3.2, Python 3.3

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



[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-09-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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