[backport to 3.5] bpo-29438: Fixed use-after-free in key sharing dict by methane · Pull Request #40 · python/cpython
methane
changed the title
bpo-29438: Fixed use-after-free in key sharing dict
[backport to 3.5] bpo-29438: Fixed use-after-free in key sharing dict
This was referenced
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request
SonicField added a commit to SonicField/cpython that referenced this pull request
Move bytecode_offset=-1 initialization into hir_c_alloc_instr so the invariant is structurally enforced — even if hir_c_init_instr is accidentally skipped, bytecode_offset will be -1 (not 0 from calloc). Add runtime regression test in hir_instr_c_verify.cpp that verifies the invariant for all three allocation paths (raw alloc, init_instr, init_deopt). Runs at startup via __attribute__((constructor)). Addresses gap flagged 5 times (Pythia python#14, python#40, python#59, librarian x2).
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