gh-146102: Fix various bugs in compiler pipeline from bug report#146443
Open
A0su wants to merge 2 commits intopython:mainfrom
Open
gh-146102: Fix various bugs in compiler pipeline from bug report#146443A0su wants to merge 2 commits intopython:mainfrom
A0su wants to merge 2 commits intopython:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compiler Pipeline (codegen + compile + symtable + flowgraph + assemble) | 6 FIX
codegen.c (6,632 lines) — 4 FIX
codegen_setup_annotations_scope(line 716-720):PyLong_FromLongresult not NULL-checked, passed toADDOP_LOAD_CONSTwhich dereferences it. Also never DECREF'd even on success.mangledincodegen_nameop(line 3280):RETURN_IF_ERROR(scope)early-returns without DECREF'ingmangledfrom_PyCompile_MaybeMangle._PyCompile_PushFBlockincodegen_unwind_fblock_stack(line 669): Return value silently discarded, error lost, frame block stack left inconsistent.compile.c (1,772 lines) — 1 FIX
origin_PyCompile_TweakInlinedComprehensionScopes(line 1096-1114):PyDict_GetItemRefreturns new ref inorig, never DECREF'd on any path (success or error). Leaks on every inlined comprehension.assemble.c (802 lines) — 1 FIX
assemble_emit_instrreturns ERROR without exception (line 420-421): Bytecode overflow check returns ERROR withoutPyErr_NoMemory()→ SystemError.symtable.c (3,355 lines) — 0 FIX (clean)
flowgraph.c (4,088 lines) — 0 FIX (clean)
Did not fix
mangledincodegen_deferred_annotations_body(line 792-818)