Skip to content

Conversation

@zsol
Copy link
Member

@zsol zsol commented Jul 16, 2022

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 <[email protected]>
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