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: tstate may be used uninitialized in Py_NewInterpreter
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: matrixise, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2019-03-17 17:40 by matrixise, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12381 merged matrixise, 2019-03-17 17:42
Messages (2)
msg338134 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-03-17 17:40
I get this warning when I compile python without the --with-pydebug flag.


Python/pylifecycle.c: In function 'Py_NewInterpreter':
Python/pylifecycle.c:1442:12: warning: 'tstate' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return tstate;
            ^~~~~~

Does not occur with python 3.7
msg338251 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-03-18 16:10
New changeset 9e06d2b865beb62e54a4da39eb191f9fb8385282 by Victor Stinner (Stéphane Wirtel) in branch 'master':
bpo-36328: Fix compiler warning in Py_NewInterpreter() (GH-12381)
https://github.com/python/cpython/commit/9e06d2b865beb62e54a4da39eb191f9fb8385282
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80509
2019-03-18 16:10:49vstinnersetstatus: open -> closed
resolution: fixed
components: + Interpreter Core
stage: patch review -> resolved
2019-03-18 16:10:34vstinnersetnosy: + vstinner
messages: + msg338251
2019-03-17 17:42:38matrixisesetkeywords: + patch
stage: patch review
pull_requests: + pull_request12339
2019-03-17 17:40:54matrixisecreate