aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/assemble.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-03-27 17:38:19 +0000
committerGitHub <noreply@github.com>2024-03-27 17:38:19 +0000
commit262fb911ab7df8e890ebd0efb0773c3e0b5a757f (patch)
tree250f7b163f7cc074be10e6c5c2321579eca991b4 /Python/assemble.c
parent74c8568d07719529b874897598d8b3bc25ff0434 (diff)
downloadcpython-262fb911ab7df8e890ebd0efb0773c3e0b5a757f.tar.gz
cpython-262fb911ab7df8e890ebd0efb0773c3e0b5a757f.zip
gh-117288: Allocate fewer label IDs in _PyCfg_ToInstructionSequence (#117290)
Diffstat (limited to 'Python/assemble.c')
-rw-r--r--Python/assemble.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/assemble.c b/Python/assemble.c
index 569454ebf3b..09db2fab48d 100644
--- a/Python/assemble.c
+++ b/Python/assemble.c
@@ -736,6 +736,9 @@ _PyAssemble_MakeCodeObject(_PyCompile_CodeUnitMetadata *umd, PyObject *const_cac
int nlocalsplus, int code_flags, PyObject *filename)
{
+ if (_PyCompile_InstructionSequence_ApplyLabelMap(instrs) < 0) {
+ return NULL;
+ }
if (resolve_unconditional_jumps(instrs) < 0) {
return NULL;
}