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