This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _tracemalloc.c: compiler warning with gil_state
Type: Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, koobs, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2013-11-24 18:26 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cleanup.patch vstinner, 2013-11-28 00:55 review
Messages (3)
msg204254 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-24 18:26
Clang complains that gil_state might be used uninitialized in _tracemalloc.c:488 and 533.
msg204633 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-28 00:55
Hum, Clang is not kind enough to understand that gil_state is not used when uninitialized.

Well, I always hesitated to refactor the code. So here is a cleanup which moves PyGILState_Ensure/PyGILState_Release to the caller. It duplicates a few lines of code, but the new code should be more readable.
msg205180 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-04 00:29
New changeset 194f74044537 by Victor Stinner in branch 'default':
Close #19757: Cleanup tracemalloc, move
http://hg.python.org/cpython/rev/194f74044537
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63956
2013-12-04 00:29:48python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg205180

resolution: fixed
stage: resolved
2013-11-28 00:55:43vstinnersetfiles: + cleanup.patch
keywords: + patch
messages: + msg204633
2013-11-24 18:28:54koobssetnosy: + koobs
2013-11-24 18:26:57vstinnercreate