diff options
| author | Victor Stinner <vstinner@python.org> | 2024-06-07 15:17:06 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 15:17:06 (GMT) |
| commit | b3b5278475b31713fa86eaddfcbf4f22859ce59b (patch) | |
| tree | d5571f6a15e5c03e04f2d1c4c48d05654670435e /Python/Python-tokenize.c | |
| parent | 9cdf69607593e05ca425c94a0d21efe668ac3875 (diff) | |
| download | cpython-b3b5278475b31713fa86eaddfcbf4f22859ce59b.zip cpython-b3b5278475b31713fa86eaddfcbf4f22859ce59b.tar.gz cpython-b3b5278475b31713fa86eaddfcbf4f22859ce59b.tar.bz2 | |
[3.12] gh-120155: Fix optimize_and_assemble_code_unit() error handling (#120231)
gh-120155: Fix optimize_and_assemble_code_unit() error handling
Don't use 'g' before it's being initialized: don't use the 'error'
label if consts_dict_keys_inorder() failed.
Fix the Coverity issue:
Error: UNINIT (CWE-457):
Python-3.12.2/Python/compile.c:7670:5: skipped_decl: Jumping over declaration of ""g"".
Python-3.12.2/Python/compile.c:7714:5: uninit_use_in_call: Using uninitialized value ""g.g_block_list"" when calling ""_PyCfgBuilder_Fini"".
Python-3.12.2/Python/compile.c:7714:5: uninit_use_in_call: Using uninitialized value ""g.g_entryblock"" when calling ""_PyCfgBuilder_Fini"".
7712| Py_XDECREF(consts);
7713| instr_sequence_fini(&optimized_instrs);
7714|-> _PyCfgBuilder_Fini(&g);
7715| return co;
7716| }
Diffstat (limited to 'Python/Python-tokenize.c')
0 files changed, 0 insertions, 0 deletions
