Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue23998

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:PyImport_ReInitLock() doesn't check for allocation error
Type:behaviorStage:resolved
Components:Versions:Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: christian.heimesNosy List: brett.cannon, christian.heimes, python-dev
Priority:normalKeywords:buildbot, easy, patch

Created on2015-04-18 22:42 bychristian.heimes, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
import_reinit_fatal.patchchristian.heimes,2015-04-18 22:42review
Messages (4)
msg241462 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2015-04-18 22:42
_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.
msg241517 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2015-04-19 14:18
LGTM
msg241547 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-04-19 19:15
New changesetd70995cf44b3 by Christian Heimes in branch '2.7':Issue#23998: PyImport_ReInitLock() now checks for lock allocation errorhttps://hg.python.org/cpython/rev/d70995cf44b3New changeset7d7bf5c34d7e by Christian Heimes in branch '3.3':Issue#23998: PyImport_ReInitLock() now checks for lock allocation errorhttps://hg.python.org/cpython/rev/7d7bf5c34d7eNew changesete0bd083fc9c1 by Christian Heimes in branch '3.4':Issue#23998: PyImport_ReInitLock() now checks for lock allocation errorhttps://hg.python.org/cpython/rev/e0bd083fc9c1New changeset7ae8fd62d743 by Christian Heimes in branch 'default':Issue#23998: PyImport_ReInitLock() now checks for lock allocation errorhttps://hg.python.org/cpython/rev/7ae8fd62d743
msg241656 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2015-04-20 14:52
Thanks, Brett!
History
DateUserActionArgs
2022-04-11 14:58:15adminsetgithub: 68186
2015-04-20 14:52:14christian.heimessetstatus: open -> closed
resolution: fixed
messages: +msg241656

stage: commit review -> resolved
2015-04-19 19:15:52python-devsetnosy: +python-dev
messages: +msg241547
2015-04-19 14:18:02brett.cannonsetnosy: +brett.cannon
messages: +msg241517

assignee:christian.heimes
stage: patch review -> commit review
2015-04-18 22:42:35christian.heimescreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp