Skip to content

[mypyc] flush keepalives on operator assignment statements - #13144

Merged
ilevkivskyi merged 1 commit into
python:masterfrom
zsol:issue-941
Jul 16, 2022
Merged

ilevkivskyi merged 1 commit into
python:masterfrom
zsol:issue-941

Conversation

@zsol

@zsol zsol commented Jul 16, 2022 •

Copy link
Copy Markdown
Member

Description

This PR makes mypyc flush keepalives on operator assignment statements, to prevent accessing undefined variables in the generated C code.

Fixes mypyc/mypyc#941.

Test Plan

  • Write a test case

@zsol
zsol marked this pull request as ready for review July 16, 2022 12:01
@zsol zsol changed the title [mypyc] flush keepalives on empty return statements [mypyc] flush keepalives on operator assignment statements Jul 16, 2022
@ilevkivskyi
ilevkivskyi merged commit d3e0db7 into python:master Jul 16, 2022
@zsol
zsol deleted the issue-941 branch July 16, 2022 15:18
hauntsaninja pushed a commit to hauntsaninja/mypy that referenced this pull request Jul 16, 2022
This PR makes mypyc flush keepalives on operator assignment statements, to prevent accessing undefined variables in the generated C code.

Fixes mypyc/mypyc#941.
ilevkivskyi pushed a commit that referenced this pull request Jul 16, 2022
This PR makes mypyc flush keepalives on operator assignment statements, to prevent accessing undefined variables in the generated C code.

Fixes mypyc/mypyc#941.

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional early return of a generator method with attribute update causes DecRef on uninitialized self variable

2 participants